diff --git a/packages/google-cloud-confidentialcomputing/protos/google/cloud/confidentialcomputing/v1/service.proto b/packages/google-cloud-confidentialcomputing/protos/google/cloud/confidentialcomputing/v1/service.proto index a4b0a54281a..b9f0bbd5b9a 100644 --- a/packages/google-cloud-confidentialcomputing/protos/google/cloud/confidentialcomputing/v1/service.proto +++ b/packages/google-cloud-confidentialcomputing/protos/google/cloud/confidentialcomputing/v1/service.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -192,6 +192,13 @@ message VerifyAttestationRequest { [(google.api.field_behavior) = OPTIONAL]; } + // An optional device attestation report. + oneof device_attestation { + // Optional. An Nvidia attestation report for GPU and NVSwitch devices. + NvidiaAttestation nvidia_attestation = 9 + [(google.api.field_behavior) = OPTIONAL]; + } + // Required. The name of the Challenge whose nonce was used to generate the // attestation, in the format `projects/*/locations/*/challenges/*`. The // provided Challenge will be consumed, and cannot be used again. @@ -223,6 +230,99 @@ message VerifyAttestationRequest { string attester = 8 [(google.api.field_behavior) = OPTIONAL]; } +// An Nvidia attestation report for GPU and NVSwitch devices. +// Contains necessary attestation evidence that the client collects for +// verification. +message NvidiaAttestation { + // GpuInfo contains the attestation evidence for a GPU device. + message GpuInfo { + // Optional. The UUID of the GPU device. + string uuid = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The driver version of the GPU. + string driver_version = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The vBIOS version of the GPU. + string vbios_version = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The GPU architecture type. + GpuArchitectureType gpu_architecture_type = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The raw attestation certificate chain for the GPU device. + bytes attestation_certificate_chain = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The raw attestation report for the GPU device. + // This field contains SPDM request/response defined in + // https://www.dmtf.org/sites/default/files/standards/documents/DSP0274_1.1.0.pdf + bytes attestation_report = 6 [(google.api.field_behavior) = OPTIONAL]; + } + + // SwitchInfo contains the attestation evidence for a NVSwitch device. + message SwitchInfo { + // Optional. The UUID of the NVSwitch device. + string uuid = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The raw attestation certificate chain for the NVSwitch device. + bytes attestation_certificate_chain = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The raw attestation report for the NvSwitch device. + // This field contains SPDM request/response defined in + // https://www.dmtf.org/sites/default/files/standards/documents/DSP0274_1.1.0.pdf + bytes attestation_report = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Single GPU Passthrough (SPT) attestation. + message SinglePassthroughAttestation { + // Optional. Single GPU quote. + GpuInfo gpu_quote = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // Protected PCIe (PPCIE) attestation. + // Eight Hopper GPUs with Four NVSwitch Passthrough. + message ProtectedPcieAttestation { + // Optional. A list of GPU infos. + repeated GpuInfo gpu_quotes = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of SWITCH infos. + repeated SwitchInfo switch_quotes = 2 + [(google.api.field_behavior) = OPTIONAL]; + } + + // MultiGpuSecurePassthroughAttestation contains the attestation evidence + // for a Multi-GPU Secure Passthrough (MPT) attestation. + message MultiGpuSecurePassthroughAttestation { + // Optional. A list of GPU quotes. + repeated GpuInfo gpu_quotes = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // GpuArchitectureType enumerates the supported GPU architecture types. + enum GpuArchitectureType { + // Unspecified GPU architecture type. + GPU_ARCHITECTURE_TYPE_UNSPECIFIED = 0; + + // Hopper GPU architecture type. + GPU_ARCHITECTURE_TYPE_HOPPER = 8; + + // Blackwell GPU architecture type. + GPU_ARCHITECTURE_TYPE_BLACKWELL = 10; + } + + // The Confidential Computing feature that the attestation is for. + oneof cc_feature { + // Single GPU Passthrough (SPT) attestation. + SinglePassthroughAttestation spt = 1; + + // Protected PCIe (PPCIE) attestation. + ProtectedPcieAttestation ppcie = 2; + + // Multi-GPU Secure Passthrough (MPT) attestation. + MultiGpuSecurePassthroughAttestation mpt = 3; + } +} + // A TDX Attestation quote. message TdxCcelAttestation { // Optional. The Confidential Computing Event Log (CCEL) ACPI table. Formatted @@ -474,6 +574,11 @@ message VerifyConfidentialSpaceRequest { // Optional. A collection of fields that modify the token output. ConfidentialSpaceOptions options = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An optional Nvidia attestation report, used to populate hardware + // rooted claims for Nvidia devices. + NvidiaAttestation nvidia_attestation = 8 + [(google.api.field_behavior) = OPTIONAL]; } // GceShieldedIdentity contains information about a Compute Engine instance. @@ -509,6 +614,22 @@ message VerifyConfidentialSpaceResponse { // needed for this service to verify Confidential GKE platform state of the // requestor. message VerifyConfidentialGkeRequest { + // Token options for Confidential GKE attestation. + message ConfidentialGkeOptions { + // Optional. Optional string to issue the token with a custom audience + // claim. Required if custom nonces are specified. + string audience = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Optional parameter to place one or more nonces in the eat_nonce + // claim in the output token. The minimum size for JSON-encoded EATs is 10 + // bytes and the maximum size is 74 bytes. + repeated string nonce = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Optional specification for how to sign the attestation token. + // Defaults to SIGNATURE_TYPE_OIDC if unspecified. + SignatureType signature_type = 4 [(google.api.field_behavior) = OPTIONAL]; + } + // Required. A tee attestation report, used to populate hardware rooted // claims. oneof tee_attestation { @@ -526,6 +647,9 @@ message VerifyConfidentialGkeRequest { type: "confidentialcomputing.googleapis.com/Challenge" } ]; + + // Optional. A collection of fields that modify the token output. + ConfidentialGkeOptions options = 3 [(google.api.field_behavior) = OPTIONAL]; } // VerifyConfidentialGkeResponse response is returened once a Confidential GKE diff --git a/packages/google-cloud-confidentialcomputing/protos/protos.d.ts b/packages/google-cloud-confidentialcomputing/protos/protos.d.ts index 16802262da9..6eac0170535 100644 --- a/packages/google-cloud-confidentialcomputing/protos/protos.d.ts +++ b/packages/google-cloud-confidentialcomputing/protos/protos.d.ts @@ -398,6 +398,9 @@ export namespace google { /** VerifyAttestationRequest sevSnpAttestation */ sevSnpAttestation?: (google.cloud.confidentialcomputing.v1.ISevSnpAttestation|null); + /** VerifyAttestationRequest nvidiaAttestation */ + nvidiaAttestation?: (google.cloud.confidentialcomputing.v1.INvidiaAttestation|null); + /** VerifyAttestationRequest challenge */ challenge?: (string|null); @@ -432,6 +435,9 @@ export namespace google { /** VerifyAttestationRequest sevSnpAttestation. */ public sevSnpAttestation?: (google.cloud.confidentialcomputing.v1.ISevSnpAttestation|null); + /** VerifyAttestationRequest nvidiaAttestation. */ + public nvidiaAttestation?: (google.cloud.confidentialcomputing.v1.INvidiaAttestation|null); + /** VerifyAttestationRequest challenge. */ public challenge: string; @@ -453,6 +459,9 @@ export namespace google { /** VerifyAttestationRequest teeAttestation. */ public teeAttestation?: ("tdCcel"|"sevSnpAttestation"); + /** VerifyAttestationRequest deviceAttestation. */ + public deviceAttestation?: "nvidiaAttestation"; + /** * Creates a new VerifyAttestationRequest instance using the specified properties. * @param [properties] Properties to set @@ -531,6 +540,661 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a NvidiaAttestation. */ + interface INvidiaAttestation { + + /** NvidiaAttestation spt */ + spt?: (google.cloud.confidentialcomputing.v1.NvidiaAttestation.ISinglePassthroughAttestation|null); + + /** NvidiaAttestation ppcie */ + ppcie?: (google.cloud.confidentialcomputing.v1.NvidiaAttestation.IProtectedPcieAttestation|null); + + /** NvidiaAttestation mpt */ + mpt?: (google.cloud.confidentialcomputing.v1.NvidiaAttestation.IMultiGpuSecurePassthroughAttestation|null); + } + + /** Represents a NvidiaAttestation. */ + class NvidiaAttestation implements INvidiaAttestation { + + /** + * Constructs a new NvidiaAttestation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.confidentialcomputing.v1.INvidiaAttestation); + + /** NvidiaAttestation spt. */ + public spt?: (google.cloud.confidentialcomputing.v1.NvidiaAttestation.ISinglePassthroughAttestation|null); + + /** NvidiaAttestation ppcie. */ + public ppcie?: (google.cloud.confidentialcomputing.v1.NvidiaAttestation.IProtectedPcieAttestation|null); + + /** NvidiaAttestation mpt. */ + public mpt?: (google.cloud.confidentialcomputing.v1.NvidiaAttestation.IMultiGpuSecurePassthroughAttestation|null); + + /** NvidiaAttestation ccFeature. */ + public ccFeature?: ("spt"|"ppcie"|"mpt"); + + /** + * Creates a new NvidiaAttestation instance using the specified properties. + * @param [properties] Properties to set + * @returns NvidiaAttestation instance + */ + public static create(properties?: google.cloud.confidentialcomputing.v1.INvidiaAttestation): google.cloud.confidentialcomputing.v1.NvidiaAttestation; + + /** + * Encodes the specified NvidiaAttestation message. Does not implicitly {@link google.cloud.confidentialcomputing.v1.NvidiaAttestation.verify|verify} messages. + * @param message NvidiaAttestation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.confidentialcomputing.v1.INvidiaAttestation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NvidiaAttestation message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1.NvidiaAttestation.verify|verify} messages. + * @param message NvidiaAttestation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.confidentialcomputing.v1.INvidiaAttestation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NvidiaAttestation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NvidiaAttestation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.confidentialcomputing.v1.NvidiaAttestation; + + /** + * Decodes a NvidiaAttestation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NvidiaAttestation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.confidentialcomputing.v1.NvidiaAttestation; + + /** + * Verifies a NvidiaAttestation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NvidiaAttestation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NvidiaAttestation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.confidentialcomputing.v1.NvidiaAttestation; + + /** + * Creates a plain object from a NvidiaAttestation message. Also converts values to other types if specified. + * @param message NvidiaAttestation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.confidentialcomputing.v1.NvidiaAttestation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NvidiaAttestation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NvidiaAttestation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NvidiaAttestation { + + /** Properties of a GpuInfo. */ + interface IGpuInfo { + + /** GpuInfo uuid */ + uuid?: (string|null); + + /** GpuInfo driverVersion */ + driverVersion?: (string|null); + + /** GpuInfo vbiosVersion */ + vbiosVersion?: (string|null); + + /** GpuInfo gpuArchitectureType */ + gpuArchitectureType?: (google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuArchitectureType|keyof typeof google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuArchitectureType|null); + + /** GpuInfo attestationCertificateChain */ + attestationCertificateChain?: (Uint8Array|Buffer|string|null); + + /** GpuInfo attestationReport */ + attestationReport?: (Uint8Array|Buffer|string|null); + } + + /** Represents a GpuInfo. */ + class GpuInfo implements IGpuInfo { + + /** + * Constructs a new GpuInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.confidentialcomputing.v1.NvidiaAttestation.IGpuInfo); + + /** GpuInfo uuid. */ + public uuid: string; + + /** GpuInfo driverVersion. */ + public driverVersion: string; + + /** GpuInfo vbiosVersion. */ + public vbiosVersion: string; + + /** GpuInfo gpuArchitectureType. */ + public gpuArchitectureType: (google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuArchitectureType|keyof typeof google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuArchitectureType); + + /** GpuInfo attestationCertificateChain. */ + public attestationCertificateChain: (Uint8Array|Buffer|string); + + /** GpuInfo attestationReport. */ + public attestationReport: (Uint8Array|Buffer|string); + + /** + * Creates a new GpuInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GpuInfo instance + */ + public static create(properties?: google.cloud.confidentialcomputing.v1.NvidiaAttestation.IGpuInfo): google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo; + + /** + * Encodes the specified GpuInfo message. Does not implicitly {@link google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo.verify|verify} messages. + * @param message GpuInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.confidentialcomputing.v1.NvidiaAttestation.IGpuInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GpuInfo message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo.verify|verify} messages. + * @param message GpuInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.confidentialcomputing.v1.NvidiaAttestation.IGpuInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GpuInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GpuInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo; + + /** + * Decodes a GpuInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GpuInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo; + + /** + * Verifies a GpuInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GpuInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GpuInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo; + + /** + * Creates a plain object from a GpuInfo message. Also converts values to other types if specified. + * @param message GpuInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GpuInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GpuInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SwitchInfo. */ + interface ISwitchInfo { + + /** SwitchInfo uuid */ + uuid?: (string|null); + + /** SwitchInfo attestationCertificateChain */ + attestationCertificateChain?: (Uint8Array|Buffer|string|null); + + /** SwitchInfo attestationReport */ + attestationReport?: (Uint8Array|Buffer|string|null); + } + + /** Represents a SwitchInfo. */ + class SwitchInfo implements ISwitchInfo { + + /** + * Constructs a new SwitchInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.confidentialcomputing.v1.NvidiaAttestation.ISwitchInfo); + + /** SwitchInfo uuid. */ + public uuid: string; + + /** SwitchInfo attestationCertificateChain. */ + public attestationCertificateChain: (Uint8Array|Buffer|string); + + /** SwitchInfo attestationReport. */ + public attestationReport: (Uint8Array|Buffer|string); + + /** + * Creates a new SwitchInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SwitchInfo instance + */ + public static create(properties?: google.cloud.confidentialcomputing.v1.NvidiaAttestation.ISwitchInfo): google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo; + + /** + * Encodes the specified SwitchInfo message. Does not implicitly {@link google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo.verify|verify} messages. + * @param message SwitchInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.confidentialcomputing.v1.NvidiaAttestation.ISwitchInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SwitchInfo message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo.verify|verify} messages. + * @param message SwitchInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.confidentialcomputing.v1.NvidiaAttestation.ISwitchInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SwitchInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SwitchInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo; + + /** + * Decodes a SwitchInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SwitchInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo; + + /** + * Verifies a SwitchInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SwitchInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SwitchInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo; + + /** + * Creates a plain object from a SwitchInfo message. Also converts values to other types if specified. + * @param message SwitchInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SwitchInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SwitchInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SinglePassthroughAttestation. */ + interface ISinglePassthroughAttestation { + + /** SinglePassthroughAttestation gpuQuote */ + gpuQuote?: (google.cloud.confidentialcomputing.v1.NvidiaAttestation.IGpuInfo|null); + } + + /** Represents a SinglePassthroughAttestation. */ + class SinglePassthroughAttestation implements ISinglePassthroughAttestation { + + /** + * Constructs a new SinglePassthroughAttestation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.confidentialcomputing.v1.NvidiaAttestation.ISinglePassthroughAttestation); + + /** SinglePassthroughAttestation gpuQuote. */ + public gpuQuote?: (google.cloud.confidentialcomputing.v1.NvidiaAttestation.IGpuInfo|null); + + /** + * Creates a new SinglePassthroughAttestation instance using the specified properties. + * @param [properties] Properties to set + * @returns SinglePassthroughAttestation instance + */ + public static create(properties?: google.cloud.confidentialcomputing.v1.NvidiaAttestation.ISinglePassthroughAttestation): google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation; + + /** + * Encodes the specified SinglePassthroughAttestation message. Does not implicitly {@link google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation.verify|verify} messages. + * @param message SinglePassthroughAttestation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.confidentialcomputing.v1.NvidiaAttestation.ISinglePassthroughAttestation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SinglePassthroughAttestation message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation.verify|verify} messages. + * @param message SinglePassthroughAttestation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.confidentialcomputing.v1.NvidiaAttestation.ISinglePassthroughAttestation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SinglePassthroughAttestation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SinglePassthroughAttestation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation; + + /** + * Decodes a SinglePassthroughAttestation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SinglePassthroughAttestation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation; + + /** + * Verifies a SinglePassthroughAttestation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SinglePassthroughAttestation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SinglePassthroughAttestation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation; + + /** + * Creates a plain object from a SinglePassthroughAttestation message. Also converts values to other types if specified. + * @param message SinglePassthroughAttestation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SinglePassthroughAttestation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SinglePassthroughAttestation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ProtectedPcieAttestation. */ + interface IProtectedPcieAttestation { + + /** ProtectedPcieAttestation gpuQuotes */ + gpuQuotes?: (google.cloud.confidentialcomputing.v1.NvidiaAttestation.IGpuInfo[]|null); + + /** ProtectedPcieAttestation switchQuotes */ + switchQuotes?: (google.cloud.confidentialcomputing.v1.NvidiaAttestation.ISwitchInfo[]|null); + } + + /** Represents a ProtectedPcieAttestation. */ + class ProtectedPcieAttestation implements IProtectedPcieAttestation { + + /** + * Constructs a new ProtectedPcieAttestation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.confidentialcomputing.v1.NvidiaAttestation.IProtectedPcieAttestation); + + /** ProtectedPcieAttestation gpuQuotes. */ + public gpuQuotes: google.cloud.confidentialcomputing.v1.NvidiaAttestation.IGpuInfo[]; + + /** ProtectedPcieAttestation switchQuotes. */ + public switchQuotes: google.cloud.confidentialcomputing.v1.NvidiaAttestation.ISwitchInfo[]; + + /** + * Creates a new ProtectedPcieAttestation instance using the specified properties. + * @param [properties] Properties to set + * @returns ProtectedPcieAttestation instance + */ + public static create(properties?: google.cloud.confidentialcomputing.v1.NvidiaAttestation.IProtectedPcieAttestation): google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation; + + /** + * Encodes the specified ProtectedPcieAttestation message. Does not implicitly {@link google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation.verify|verify} messages. + * @param message ProtectedPcieAttestation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.confidentialcomputing.v1.NvidiaAttestation.IProtectedPcieAttestation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProtectedPcieAttestation message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation.verify|verify} messages. + * @param message ProtectedPcieAttestation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.confidentialcomputing.v1.NvidiaAttestation.IProtectedPcieAttestation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProtectedPcieAttestation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProtectedPcieAttestation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation; + + /** + * Decodes a ProtectedPcieAttestation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProtectedPcieAttestation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation; + + /** + * Verifies a ProtectedPcieAttestation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ProtectedPcieAttestation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProtectedPcieAttestation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation; + + /** + * Creates a plain object from a ProtectedPcieAttestation message. Also converts values to other types if specified. + * @param message ProtectedPcieAttestation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProtectedPcieAttestation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProtectedPcieAttestation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MultiGpuSecurePassthroughAttestation. */ + interface IMultiGpuSecurePassthroughAttestation { + + /** MultiGpuSecurePassthroughAttestation gpuQuotes */ + gpuQuotes?: (google.cloud.confidentialcomputing.v1.NvidiaAttestation.IGpuInfo[]|null); + } + + /** Represents a MultiGpuSecurePassthroughAttestation. */ + class MultiGpuSecurePassthroughAttestation implements IMultiGpuSecurePassthroughAttestation { + + /** + * Constructs a new MultiGpuSecurePassthroughAttestation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.confidentialcomputing.v1.NvidiaAttestation.IMultiGpuSecurePassthroughAttestation); + + /** MultiGpuSecurePassthroughAttestation gpuQuotes. */ + public gpuQuotes: google.cloud.confidentialcomputing.v1.NvidiaAttestation.IGpuInfo[]; + + /** + * Creates a new MultiGpuSecurePassthroughAttestation instance using the specified properties. + * @param [properties] Properties to set + * @returns MultiGpuSecurePassthroughAttestation instance + */ + public static create(properties?: google.cloud.confidentialcomputing.v1.NvidiaAttestation.IMultiGpuSecurePassthroughAttestation): google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation; + + /** + * Encodes the specified MultiGpuSecurePassthroughAttestation message. Does not implicitly {@link google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation.verify|verify} messages. + * @param message MultiGpuSecurePassthroughAttestation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.confidentialcomputing.v1.NvidiaAttestation.IMultiGpuSecurePassthroughAttestation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MultiGpuSecurePassthroughAttestation message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation.verify|verify} messages. + * @param message MultiGpuSecurePassthroughAttestation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.confidentialcomputing.v1.NvidiaAttestation.IMultiGpuSecurePassthroughAttestation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MultiGpuSecurePassthroughAttestation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MultiGpuSecurePassthroughAttestation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation; + + /** + * Decodes a MultiGpuSecurePassthroughAttestation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MultiGpuSecurePassthroughAttestation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation; + + /** + * Verifies a MultiGpuSecurePassthroughAttestation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MultiGpuSecurePassthroughAttestation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MultiGpuSecurePassthroughAttestation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation; + + /** + * Creates a plain object from a MultiGpuSecurePassthroughAttestation message. Also converts values to other types if specified. + * @param message MultiGpuSecurePassthroughAttestation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MultiGpuSecurePassthroughAttestation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MultiGpuSecurePassthroughAttestation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** GpuArchitectureType enum. */ + enum GpuArchitectureType { + GPU_ARCHITECTURE_TYPE_UNSPECIFIED = 0, + GPU_ARCHITECTURE_TYPE_HOPPER = 8, + GPU_ARCHITECTURE_TYPE_BLACKWELL = 10 + } + } + /** Properties of a TdxCcelAttestation. */ interface ITdxCcelAttestation { @@ -1935,6 +2599,9 @@ export namespace google { /** VerifyConfidentialSpaceRequest options */ options?: (google.cloud.confidentialcomputing.v1.VerifyConfidentialSpaceRequest.IConfidentialSpaceOptions|null); + + /** VerifyConfidentialSpaceRequest nvidiaAttestation */ + nvidiaAttestation?: (google.cloud.confidentialcomputing.v1.INvidiaAttestation|null); } /** Represents a VerifyConfidentialSpaceRequest. */ @@ -1967,6 +2634,9 @@ export namespace google { /** VerifyConfidentialSpaceRequest options. */ public options?: (google.cloud.confidentialcomputing.v1.VerifyConfidentialSpaceRequest.IConfidentialSpaceOptions|null); + /** VerifyConfidentialSpaceRequest nvidiaAttestation. */ + public nvidiaAttestation?: (google.cloud.confidentialcomputing.v1.INvidiaAttestation|null); + /** VerifyConfidentialSpaceRequest teeAttestation. */ public teeAttestation?: ("tdCcel"|"tpmAttestation"); @@ -2389,6 +3059,9 @@ export namespace google { /** VerifyConfidentialGkeRequest challenge */ challenge?: (string|null); + + /** VerifyConfidentialGkeRequest options */ + options?: (google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.IConfidentialGkeOptions|null); } /** Represents a VerifyConfidentialGkeRequest. */ @@ -2406,6 +3079,9 @@ export namespace google { /** VerifyConfidentialGkeRequest challenge. */ public challenge: string; + /** VerifyConfidentialGkeRequest options. */ + public options?: (google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.IConfidentialGkeOptions|null); + /** VerifyConfidentialGkeRequest teeAttestation. */ public teeAttestation?: "tpmAttestation"; @@ -2487,6 +3163,118 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace VerifyConfidentialGkeRequest { + + /** Properties of a ConfidentialGkeOptions. */ + interface IConfidentialGkeOptions { + + /** ConfidentialGkeOptions audience */ + audience?: (string|null); + + /** ConfidentialGkeOptions nonce */ + nonce?: (string[]|null); + + /** ConfidentialGkeOptions signatureType */ + signatureType?: (google.cloud.confidentialcomputing.v1.SignatureType|keyof typeof google.cloud.confidentialcomputing.v1.SignatureType|null); + } + + /** Represents a ConfidentialGkeOptions. */ + class ConfidentialGkeOptions implements IConfidentialGkeOptions { + + /** + * Constructs a new ConfidentialGkeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.IConfidentialGkeOptions); + + /** ConfidentialGkeOptions audience. */ + public audience: string; + + /** ConfidentialGkeOptions nonce. */ + public nonce: string[]; + + /** ConfidentialGkeOptions signatureType. */ + public signatureType: (google.cloud.confidentialcomputing.v1.SignatureType|keyof typeof google.cloud.confidentialcomputing.v1.SignatureType); + + /** + * Creates a new ConfidentialGkeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ConfidentialGkeOptions instance + */ + public static create(properties?: google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.IConfidentialGkeOptions): google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions; + + /** + * Encodes the specified ConfidentialGkeOptions message. Does not implicitly {@link google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions.verify|verify} messages. + * @param message ConfidentialGkeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.IConfidentialGkeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConfidentialGkeOptions message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions.verify|verify} messages. + * @param message ConfidentialGkeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.IConfidentialGkeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConfidentialGkeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConfidentialGkeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions; + + /** + * Decodes a ConfidentialGkeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConfidentialGkeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions; + + /** + * Verifies a ConfidentialGkeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConfidentialGkeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConfidentialGkeOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions; + + /** + * Creates a plain object from a ConfidentialGkeOptions message. Also converts values to other types if specified. + * @param message ConfidentialGkeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConfidentialGkeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConfidentialGkeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + /** Properties of a VerifyConfidentialGkeResponse. */ interface IVerifyConfidentialGkeResponse { diff --git a/packages/google-cloud-confidentialcomputing/protos/protos.js b/packages/google-cloud-confidentialcomputing/protos/protos.js index 704b157e6f3..7111bc184fa 100644 --- a/packages/google-cloud-confidentialcomputing/protos/protos.js +++ b/packages/google-cloud-confidentialcomputing/protos/protos.js @@ -853,6 +853,7 @@ * @interface IVerifyAttestationRequest * @property {google.cloud.confidentialcomputing.v1.ITdxCcelAttestation|null} [tdCcel] VerifyAttestationRequest tdCcel * @property {google.cloud.confidentialcomputing.v1.ISevSnpAttestation|null} [sevSnpAttestation] VerifyAttestationRequest sevSnpAttestation + * @property {google.cloud.confidentialcomputing.v1.INvidiaAttestation|null} [nvidiaAttestation] VerifyAttestationRequest nvidiaAttestation * @property {string|null} [challenge] VerifyAttestationRequest challenge * @property {google.cloud.confidentialcomputing.v1.IGcpCredentials|null} [gcpCredentials] VerifyAttestationRequest gcpCredentials * @property {google.cloud.confidentialcomputing.v1.ITpmAttestation|null} [tpmAttestation] VerifyAttestationRequest tpmAttestation @@ -892,6 +893,14 @@ */ VerifyAttestationRequest.prototype.sevSnpAttestation = null; + /** + * VerifyAttestationRequest nvidiaAttestation. + * @member {google.cloud.confidentialcomputing.v1.INvidiaAttestation|null|undefined} nvidiaAttestation + * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationRequest + * @instance + */ + VerifyAttestationRequest.prototype.nvidiaAttestation = null; + /** * VerifyAttestationRequest challenge. * @member {string} challenge @@ -954,6 +963,17 @@ set: $util.oneOfSetter($oneOfFields) }); + /** + * VerifyAttestationRequest deviceAttestation. + * @member {"nvidiaAttestation"|undefined} deviceAttestation + * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationRequest + * @instance + */ + Object.defineProperty(VerifyAttestationRequest.prototype, "deviceAttestation", { + get: $util.oneOfGetter($oneOfFields = ["nvidiaAttestation"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new VerifyAttestationRequest instance using the specified properties. * @function create @@ -994,6 +1014,8 @@ $root.google.cloud.confidentialcomputing.v1.SevSnpAttestation.encode(message.sevSnpAttestation, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.attester != null && Object.hasOwnProperty.call(message, "attester")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.attester); + if (message.nvidiaAttestation != null && Object.hasOwnProperty.call(message, "nvidiaAttestation")) + $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.encode(message.nvidiaAttestation, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); return writer; }; @@ -1038,6 +1060,10 @@ message.sevSnpAttestation = $root.google.cloud.confidentialcomputing.v1.SevSnpAttestation.decode(reader, reader.uint32()); break; } + case 9: { + message.nvidiaAttestation = $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.decode(reader, reader.uint32()); + break; + } case 1: { message.challenge = reader.string(); break; @@ -1062,211 +1088,1884 @@ message.attester = reader.string(); break; } - default: - reader.skipType(tag & 7); - break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VerifyAttestationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.confidentialcomputing.v1.VerifyAttestationRequest} VerifyAttestationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifyAttestationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VerifyAttestationRequest message. + * @function verify + * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VerifyAttestationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.tdCcel != null && message.hasOwnProperty("tdCcel")) { + properties.teeAttestation = 1; + { + var error = $root.google.cloud.confidentialcomputing.v1.TdxCcelAttestation.verify(message.tdCcel); + if (error) + return "tdCcel." + error; + } + } + if (message.sevSnpAttestation != null && message.hasOwnProperty("sevSnpAttestation")) { + if (properties.teeAttestation === 1) + return "teeAttestation: multiple values"; + properties.teeAttestation = 1; + { + var error = $root.google.cloud.confidentialcomputing.v1.SevSnpAttestation.verify(message.sevSnpAttestation); + if (error) + return "sevSnpAttestation." + error; + } + } + if (message.nvidiaAttestation != null && message.hasOwnProperty("nvidiaAttestation")) { + properties.deviceAttestation = 1; + { + var error = $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.verify(message.nvidiaAttestation); + if (error) + return "nvidiaAttestation." + error; + } + } + if (message.challenge != null && message.hasOwnProperty("challenge")) + if (!$util.isString(message.challenge)) + return "challenge: string expected"; + if (message.gcpCredentials != null && message.hasOwnProperty("gcpCredentials")) { + var error = $root.google.cloud.confidentialcomputing.v1.GcpCredentials.verify(message.gcpCredentials); + if (error) + return "gcpCredentials." + error; + } + if (message.tpmAttestation != null && message.hasOwnProperty("tpmAttestation")) { + var error = $root.google.cloud.confidentialcomputing.v1.TpmAttestation.verify(message.tpmAttestation); + if (error) + return "tpmAttestation." + error; + } + if (message.confidentialSpaceInfo != null && message.hasOwnProperty("confidentialSpaceInfo")) { + var error = $root.google.cloud.confidentialcomputing.v1.ConfidentialSpaceInfo.verify(message.confidentialSpaceInfo); + if (error) + return "confidentialSpaceInfo." + error; + } + if (message.tokenOptions != null && message.hasOwnProperty("tokenOptions")) { + var error = $root.google.cloud.confidentialcomputing.v1.TokenOptions.verify(message.tokenOptions); + if (error) + return "tokenOptions." + error; + } + if (message.attester != null && message.hasOwnProperty("attester")) + if (!$util.isString(message.attester)) + return "attester: string expected"; + return null; + }; + + /** + * Creates a VerifyAttestationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.confidentialcomputing.v1.VerifyAttestationRequest} VerifyAttestationRequest + */ + VerifyAttestationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.confidentialcomputing.v1.VerifyAttestationRequest) + return object; + var message = new $root.google.cloud.confidentialcomputing.v1.VerifyAttestationRequest(); + if (object.tdCcel != null) { + if (typeof object.tdCcel !== "object") + throw TypeError(".google.cloud.confidentialcomputing.v1.VerifyAttestationRequest.tdCcel: object expected"); + message.tdCcel = $root.google.cloud.confidentialcomputing.v1.TdxCcelAttestation.fromObject(object.tdCcel); + } + if (object.sevSnpAttestation != null) { + if (typeof object.sevSnpAttestation !== "object") + throw TypeError(".google.cloud.confidentialcomputing.v1.VerifyAttestationRequest.sevSnpAttestation: object expected"); + message.sevSnpAttestation = $root.google.cloud.confidentialcomputing.v1.SevSnpAttestation.fromObject(object.sevSnpAttestation); + } + if (object.nvidiaAttestation != null) { + if (typeof object.nvidiaAttestation !== "object") + throw TypeError(".google.cloud.confidentialcomputing.v1.VerifyAttestationRequest.nvidiaAttestation: object expected"); + message.nvidiaAttestation = $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.fromObject(object.nvidiaAttestation); + } + if (object.challenge != null) + message.challenge = String(object.challenge); + if (object.gcpCredentials != null) { + if (typeof object.gcpCredentials !== "object") + throw TypeError(".google.cloud.confidentialcomputing.v1.VerifyAttestationRequest.gcpCredentials: object expected"); + message.gcpCredentials = $root.google.cloud.confidentialcomputing.v1.GcpCredentials.fromObject(object.gcpCredentials); + } + if (object.tpmAttestation != null) { + if (typeof object.tpmAttestation !== "object") + throw TypeError(".google.cloud.confidentialcomputing.v1.VerifyAttestationRequest.tpmAttestation: object expected"); + message.tpmAttestation = $root.google.cloud.confidentialcomputing.v1.TpmAttestation.fromObject(object.tpmAttestation); + } + if (object.confidentialSpaceInfo != null) { + if (typeof object.confidentialSpaceInfo !== "object") + throw TypeError(".google.cloud.confidentialcomputing.v1.VerifyAttestationRequest.confidentialSpaceInfo: object expected"); + message.confidentialSpaceInfo = $root.google.cloud.confidentialcomputing.v1.ConfidentialSpaceInfo.fromObject(object.confidentialSpaceInfo); + } + if (object.tokenOptions != null) { + if (typeof object.tokenOptions !== "object") + throw TypeError(".google.cloud.confidentialcomputing.v1.VerifyAttestationRequest.tokenOptions: object expected"); + message.tokenOptions = $root.google.cloud.confidentialcomputing.v1.TokenOptions.fromObject(object.tokenOptions); + } + if (object.attester != null) + message.attester = String(object.attester); + return message; + }; + + /** + * Creates a plain object from a VerifyAttestationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationRequest + * @static + * @param {google.cloud.confidentialcomputing.v1.VerifyAttestationRequest} message VerifyAttestationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VerifyAttestationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.challenge = ""; + object.gcpCredentials = null; + object.tpmAttestation = null; + object.confidentialSpaceInfo = null; + object.tokenOptions = null; + object.attester = ""; + } + if (message.challenge != null && message.hasOwnProperty("challenge")) + object.challenge = message.challenge; + if (message.gcpCredentials != null && message.hasOwnProperty("gcpCredentials")) + object.gcpCredentials = $root.google.cloud.confidentialcomputing.v1.GcpCredentials.toObject(message.gcpCredentials, options); + if (message.tpmAttestation != null && message.hasOwnProperty("tpmAttestation")) + object.tpmAttestation = $root.google.cloud.confidentialcomputing.v1.TpmAttestation.toObject(message.tpmAttestation, options); + if (message.confidentialSpaceInfo != null && message.hasOwnProperty("confidentialSpaceInfo")) + object.confidentialSpaceInfo = $root.google.cloud.confidentialcomputing.v1.ConfidentialSpaceInfo.toObject(message.confidentialSpaceInfo, options); + if (message.tokenOptions != null && message.hasOwnProperty("tokenOptions")) + object.tokenOptions = $root.google.cloud.confidentialcomputing.v1.TokenOptions.toObject(message.tokenOptions, options); + if (message.tdCcel != null && message.hasOwnProperty("tdCcel")) { + object.tdCcel = $root.google.cloud.confidentialcomputing.v1.TdxCcelAttestation.toObject(message.tdCcel, options); + if (options.oneofs) + object.teeAttestation = "tdCcel"; + } + if (message.sevSnpAttestation != null && message.hasOwnProperty("sevSnpAttestation")) { + object.sevSnpAttestation = $root.google.cloud.confidentialcomputing.v1.SevSnpAttestation.toObject(message.sevSnpAttestation, options); + if (options.oneofs) + object.teeAttestation = "sevSnpAttestation"; + } + if (message.attester != null && message.hasOwnProperty("attester")) + object.attester = message.attester; + if (message.nvidiaAttestation != null && message.hasOwnProperty("nvidiaAttestation")) { + object.nvidiaAttestation = $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.toObject(message.nvidiaAttestation, options); + if (options.oneofs) + object.deviceAttestation = "nvidiaAttestation"; + } + return object; + }; + + /** + * Converts this VerifyAttestationRequest to JSON. + * @function toJSON + * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationRequest + * @instance + * @returns {Object.} JSON object + */ + VerifyAttestationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VerifyAttestationRequest + * @function getTypeUrl + * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VerifyAttestationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.confidentialcomputing.v1.VerifyAttestationRequest"; + }; + + return VerifyAttestationRequest; + })(); + + v1.NvidiaAttestation = (function() { + + /** + * Properties of a NvidiaAttestation. + * @memberof google.cloud.confidentialcomputing.v1 + * @interface INvidiaAttestation + * @property {google.cloud.confidentialcomputing.v1.NvidiaAttestation.ISinglePassthroughAttestation|null} [spt] NvidiaAttestation spt + * @property {google.cloud.confidentialcomputing.v1.NvidiaAttestation.IProtectedPcieAttestation|null} [ppcie] NvidiaAttestation ppcie + * @property {google.cloud.confidentialcomputing.v1.NvidiaAttestation.IMultiGpuSecurePassthroughAttestation|null} [mpt] NvidiaAttestation mpt + */ + + /** + * Constructs a new NvidiaAttestation. + * @memberof google.cloud.confidentialcomputing.v1 + * @classdesc Represents a NvidiaAttestation. + * @implements INvidiaAttestation + * @constructor + * @param {google.cloud.confidentialcomputing.v1.INvidiaAttestation=} [properties] Properties to set + */ + function NvidiaAttestation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NvidiaAttestation spt. + * @member {google.cloud.confidentialcomputing.v1.NvidiaAttestation.ISinglePassthroughAttestation|null|undefined} spt + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation + * @instance + */ + NvidiaAttestation.prototype.spt = null; + + /** + * NvidiaAttestation ppcie. + * @member {google.cloud.confidentialcomputing.v1.NvidiaAttestation.IProtectedPcieAttestation|null|undefined} ppcie + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation + * @instance + */ + NvidiaAttestation.prototype.ppcie = null; + + /** + * NvidiaAttestation mpt. + * @member {google.cloud.confidentialcomputing.v1.NvidiaAttestation.IMultiGpuSecurePassthroughAttestation|null|undefined} mpt + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation + * @instance + */ + NvidiaAttestation.prototype.mpt = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NvidiaAttestation ccFeature. + * @member {"spt"|"ppcie"|"mpt"|undefined} ccFeature + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation + * @instance + */ + Object.defineProperty(NvidiaAttestation.prototype, "ccFeature", { + get: $util.oneOfGetter($oneOfFields = ["spt", "ppcie", "mpt"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NvidiaAttestation instance using the specified properties. + * @function create + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation + * @static + * @param {google.cloud.confidentialcomputing.v1.INvidiaAttestation=} [properties] Properties to set + * @returns {google.cloud.confidentialcomputing.v1.NvidiaAttestation} NvidiaAttestation instance + */ + NvidiaAttestation.create = function create(properties) { + return new NvidiaAttestation(properties); + }; + + /** + * Encodes the specified NvidiaAttestation message. Does not implicitly {@link google.cloud.confidentialcomputing.v1.NvidiaAttestation.verify|verify} messages. + * @function encode + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation + * @static + * @param {google.cloud.confidentialcomputing.v1.INvidiaAttestation} message NvidiaAttestation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NvidiaAttestation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.spt != null && Object.hasOwnProperty.call(message, "spt")) + $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation.encode(message.spt, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.ppcie != null && Object.hasOwnProperty.call(message, "ppcie")) + $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation.encode(message.ppcie, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.mpt != null && Object.hasOwnProperty.call(message, "mpt")) + $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation.encode(message.mpt, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NvidiaAttestation message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1.NvidiaAttestation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation + * @static + * @param {google.cloud.confidentialcomputing.v1.INvidiaAttestation} message NvidiaAttestation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NvidiaAttestation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NvidiaAttestation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.confidentialcomputing.v1.NvidiaAttestation} NvidiaAttestation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NvidiaAttestation.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.spt = $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation.decode(reader, reader.uint32()); + break; + } + case 2: { + message.ppcie = $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation.decode(reader, reader.uint32()); + break; + } + case 3: { + message.mpt = $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NvidiaAttestation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.confidentialcomputing.v1.NvidiaAttestation} NvidiaAttestation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NvidiaAttestation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NvidiaAttestation message. + * @function verify + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NvidiaAttestation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.spt != null && message.hasOwnProperty("spt")) { + properties.ccFeature = 1; + { + var error = $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation.verify(message.spt); + if (error) + return "spt." + error; + } + } + if (message.ppcie != null && message.hasOwnProperty("ppcie")) { + if (properties.ccFeature === 1) + return "ccFeature: multiple values"; + properties.ccFeature = 1; + { + var error = $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation.verify(message.ppcie); + if (error) + return "ppcie." + error; + } + } + if (message.mpt != null && message.hasOwnProperty("mpt")) { + if (properties.ccFeature === 1) + return "ccFeature: multiple values"; + properties.ccFeature = 1; + { + var error = $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation.verify(message.mpt); + if (error) + return "mpt." + error; + } + } + return null; + }; + + /** + * Creates a NvidiaAttestation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.confidentialcomputing.v1.NvidiaAttestation} NvidiaAttestation + */ + NvidiaAttestation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation) + return object; + var message = new $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation(); + if (object.spt != null) { + if (typeof object.spt !== "object") + throw TypeError(".google.cloud.confidentialcomputing.v1.NvidiaAttestation.spt: object expected"); + message.spt = $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation.fromObject(object.spt); + } + if (object.ppcie != null) { + if (typeof object.ppcie !== "object") + throw TypeError(".google.cloud.confidentialcomputing.v1.NvidiaAttestation.ppcie: object expected"); + message.ppcie = $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation.fromObject(object.ppcie); + } + if (object.mpt != null) { + if (typeof object.mpt !== "object") + throw TypeError(".google.cloud.confidentialcomputing.v1.NvidiaAttestation.mpt: object expected"); + message.mpt = $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation.fromObject(object.mpt); + } + return message; + }; + + /** + * Creates a plain object from a NvidiaAttestation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation + * @static + * @param {google.cloud.confidentialcomputing.v1.NvidiaAttestation} message NvidiaAttestation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NvidiaAttestation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.spt != null && message.hasOwnProperty("spt")) { + object.spt = $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation.toObject(message.spt, options); + if (options.oneofs) + object.ccFeature = "spt"; + } + if (message.ppcie != null && message.hasOwnProperty("ppcie")) { + object.ppcie = $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation.toObject(message.ppcie, options); + if (options.oneofs) + object.ccFeature = "ppcie"; + } + if (message.mpt != null && message.hasOwnProperty("mpt")) { + object.mpt = $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation.toObject(message.mpt, options); + if (options.oneofs) + object.ccFeature = "mpt"; + } + return object; + }; + + /** + * Converts this NvidiaAttestation to JSON. + * @function toJSON + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation + * @instance + * @returns {Object.} JSON object + */ + NvidiaAttestation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NvidiaAttestation + * @function getTypeUrl + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NvidiaAttestation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.confidentialcomputing.v1.NvidiaAttestation"; + }; + + NvidiaAttestation.GpuInfo = (function() { + + /** + * Properties of a GpuInfo. + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation + * @interface IGpuInfo + * @property {string|null} [uuid] GpuInfo uuid + * @property {string|null} [driverVersion] GpuInfo driverVersion + * @property {string|null} [vbiosVersion] GpuInfo vbiosVersion + * @property {google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuArchitectureType|null} [gpuArchitectureType] GpuInfo gpuArchitectureType + * @property {Uint8Array|null} [attestationCertificateChain] GpuInfo attestationCertificateChain + * @property {Uint8Array|null} [attestationReport] GpuInfo attestationReport + */ + + /** + * Constructs a new GpuInfo. + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation + * @classdesc Represents a GpuInfo. + * @implements IGpuInfo + * @constructor + * @param {google.cloud.confidentialcomputing.v1.NvidiaAttestation.IGpuInfo=} [properties] Properties to set + */ + function GpuInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GpuInfo uuid. + * @member {string} uuid + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo + * @instance + */ + GpuInfo.prototype.uuid = ""; + + /** + * GpuInfo driverVersion. + * @member {string} driverVersion + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo + * @instance + */ + GpuInfo.prototype.driverVersion = ""; + + /** + * GpuInfo vbiosVersion. + * @member {string} vbiosVersion + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo + * @instance + */ + GpuInfo.prototype.vbiosVersion = ""; + + /** + * GpuInfo gpuArchitectureType. + * @member {google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuArchitectureType} gpuArchitectureType + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo + * @instance + */ + GpuInfo.prototype.gpuArchitectureType = 0; + + /** + * GpuInfo attestationCertificateChain. + * @member {Uint8Array} attestationCertificateChain + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo + * @instance + */ + GpuInfo.prototype.attestationCertificateChain = $util.newBuffer([]); + + /** + * GpuInfo attestationReport. + * @member {Uint8Array} attestationReport + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo + * @instance + */ + GpuInfo.prototype.attestationReport = $util.newBuffer([]); + + /** + * Creates a new GpuInfo instance using the specified properties. + * @function create + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo + * @static + * @param {google.cloud.confidentialcomputing.v1.NvidiaAttestation.IGpuInfo=} [properties] Properties to set + * @returns {google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo} GpuInfo instance + */ + GpuInfo.create = function create(properties) { + return new GpuInfo(properties); + }; + + /** + * Encodes the specified GpuInfo message. Does not implicitly {@link google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo + * @static + * @param {google.cloud.confidentialcomputing.v1.NvidiaAttestation.IGpuInfo} message GpuInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GpuInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uuid != null && Object.hasOwnProperty.call(message, "uuid")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uuid); + if (message.driverVersion != null && Object.hasOwnProperty.call(message, "driverVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.driverVersion); + if (message.vbiosVersion != null && Object.hasOwnProperty.call(message, "vbiosVersion")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.vbiosVersion); + if (message.gpuArchitectureType != null && Object.hasOwnProperty.call(message, "gpuArchitectureType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.gpuArchitectureType); + if (message.attestationCertificateChain != null && Object.hasOwnProperty.call(message, "attestationCertificateChain")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.attestationCertificateChain); + if (message.attestationReport != null && Object.hasOwnProperty.call(message, "attestationReport")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.attestationReport); + return writer; + }; + + /** + * Encodes the specified GpuInfo message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo + * @static + * @param {google.cloud.confidentialcomputing.v1.NvidiaAttestation.IGpuInfo} message GpuInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GpuInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GpuInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo} GpuInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GpuInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.uuid = reader.string(); + break; + } + case 2: { + message.driverVersion = reader.string(); + break; + } + case 3: { + message.vbiosVersion = reader.string(); + break; + } + case 4: { + message.gpuArchitectureType = reader.int32(); + break; + } + case 5: { + message.attestationCertificateChain = reader.bytes(); + break; + } + case 6: { + message.attestationReport = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GpuInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo} GpuInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GpuInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GpuInfo message. + * @function verify + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GpuInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uuid != null && message.hasOwnProperty("uuid")) + if (!$util.isString(message.uuid)) + return "uuid: string expected"; + if (message.driverVersion != null && message.hasOwnProperty("driverVersion")) + if (!$util.isString(message.driverVersion)) + return "driverVersion: string expected"; + if (message.vbiosVersion != null && message.hasOwnProperty("vbiosVersion")) + if (!$util.isString(message.vbiosVersion)) + return "vbiosVersion: string expected"; + if (message.gpuArchitectureType != null && message.hasOwnProperty("gpuArchitectureType")) + switch (message.gpuArchitectureType) { + default: + return "gpuArchitectureType: enum value expected"; + case 0: + case 8: + case 10: + break; + } + if (message.attestationCertificateChain != null && message.hasOwnProperty("attestationCertificateChain")) + if (!(message.attestationCertificateChain && typeof message.attestationCertificateChain.length === "number" || $util.isString(message.attestationCertificateChain))) + return "attestationCertificateChain: buffer expected"; + if (message.attestationReport != null && message.hasOwnProperty("attestationReport")) + if (!(message.attestationReport && typeof message.attestationReport.length === "number" || $util.isString(message.attestationReport))) + return "attestationReport: buffer expected"; + return null; + }; + + /** + * Creates a GpuInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo} GpuInfo + */ + GpuInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo) + return object; + var message = new $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo(); + if (object.uuid != null) + message.uuid = String(object.uuid); + if (object.driverVersion != null) + message.driverVersion = String(object.driverVersion); + if (object.vbiosVersion != null) + message.vbiosVersion = String(object.vbiosVersion); + switch (object.gpuArchitectureType) { + default: + if (typeof object.gpuArchitectureType === "number") { + message.gpuArchitectureType = object.gpuArchitectureType; + break; + } + break; + case "GPU_ARCHITECTURE_TYPE_UNSPECIFIED": + case 0: + message.gpuArchitectureType = 0; + break; + case "GPU_ARCHITECTURE_TYPE_HOPPER": + case 8: + message.gpuArchitectureType = 8; + break; + case "GPU_ARCHITECTURE_TYPE_BLACKWELL": + case 10: + message.gpuArchitectureType = 10; + break; + } + if (object.attestationCertificateChain != null) + if (typeof object.attestationCertificateChain === "string") + $util.base64.decode(object.attestationCertificateChain, message.attestationCertificateChain = $util.newBuffer($util.base64.length(object.attestationCertificateChain)), 0); + else if (object.attestationCertificateChain.length >= 0) + message.attestationCertificateChain = object.attestationCertificateChain; + if (object.attestationReport != null) + if (typeof object.attestationReport === "string") + $util.base64.decode(object.attestationReport, message.attestationReport = $util.newBuffer($util.base64.length(object.attestationReport)), 0); + else if (object.attestationReport.length >= 0) + message.attestationReport = object.attestationReport; + return message; + }; + + /** + * Creates a plain object from a GpuInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo + * @static + * @param {google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo} message GpuInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GpuInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.uuid = ""; + object.driverVersion = ""; + object.vbiosVersion = ""; + object.gpuArchitectureType = options.enums === String ? "GPU_ARCHITECTURE_TYPE_UNSPECIFIED" : 0; + if (options.bytes === String) + object.attestationCertificateChain = ""; + else { + object.attestationCertificateChain = []; + if (options.bytes !== Array) + object.attestationCertificateChain = $util.newBuffer(object.attestationCertificateChain); + } + if (options.bytes === String) + object.attestationReport = ""; + else { + object.attestationReport = []; + if (options.bytes !== Array) + object.attestationReport = $util.newBuffer(object.attestationReport); + } + } + if (message.uuid != null && message.hasOwnProperty("uuid")) + object.uuid = message.uuid; + if (message.driverVersion != null && message.hasOwnProperty("driverVersion")) + object.driverVersion = message.driverVersion; + if (message.vbiosVersion != null && message.hasOwnProperty("vbiosVersion")) + object.vbiosVersion = message.vbiosVersion; + if (message.gpuArchitectureType != null && message.hasOwnProperty("gpuArchitectureType")) + object.gpuArchitectureType = options.enums === String ? $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuArchitectureType[message.gpuArchitectureType] === undefined ? message.gpuArchitectureType : $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuArchitectureType[message.gpuArchitectureType] : message.gpuArchitectureType; + if (message.attestationCertificateChain != null && message.hasOwnProperty("attestationCertificateChain")) + object.attestationCertificateChain = options.bytes === String ? $util.base64.encode(message.attestationCertificateChain, 0, message.attestationCertificateChain.length) : options.bytes === Array ? Array.prototype.slice.call(message.attestationCertificateChain) : message.attestationCertificateChain; + if (message.attestationReport != null && message.hasOwnProperty("attestationReport")) + object.attestationReport = options.bytes === String ? $util.base64.encode(message.attestationReport, 0, message.attestationReport.length) : options.bytes === Array ? Array.prototype.slice.call(message.attestationReport) : message.attestationReport; + return object; + }; + + /** + * Converts this GpuInfo to JSON. + * @function toJSON + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo + * @instance + * @returns {Object.} JSON object + */ + GpuInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GpuInfo + * @function getTypeUrl + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GpuInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo"; + }; + + return GpuInfo; + })(); + + NvidiaAttestation.SwitchInfo = (function() { + + /** + * Properties of a SwitchInfo. + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation + * @interface ISwitchInfo + * @property {string|null} [uuid] SwitchInfo uuid + * @property {Uint8Array|null} [attestationCertificateChain] SwitchInfo attestationCertificateChain + * @property {Uint8Array|null} [attestationReport] SwitchInfo attestationReport + */ + + /** + * Constructs a new SwitchInfo. + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation + * @classdesc Represents a SwitchInfo. + * @implements ISwitchInfo + * @constructor + * @param {google.cloud.confidentialcomputing.v1.NvidiaAttestation.ISwitchInfo=} [properties] Properties to set + */ + function SwitchInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SwitchInfo uuid. + * @member {string} uuid + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo + * @instance + */ + SwitchInfo.prototype.uuid = ""; + + /** + * SwitchInfo attestationCertificateChain. + * @member {Uint8Array} attestationCertificateChain + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo + * @instance + */ + SwitchInfo.prototype.attestationCertificateChain = $util.newBuffer([]); + + /** + * SwitchInfo attestationReport. + * @member {Uint8Array} attestationReport + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo + * @instance + */ + SwitchInfo.prototype.attestationReport = $util.newBuffer([]); + + /** + * Creates a new SwitchInfo instance using the specified properties. + * @function create + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo + * @static + * @param {google.cloud.confidentialcomputing.v1.NvidiaAttestation.ISwitchInfo=} [properties] Properties to set + * @returns {google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo} SwitchInfo instance + */ + SwitchInfo.create = function create(properties) { + return new SwitchInfo(properties); + }; + + /** + * Encodes the specified SwitchInfo message. Does not implicitly {@link google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo + * @static + * @param {google.cloud.confidentialcomputing.v1.NvidiaAttestation.ISwitchInfo} message SwitchInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SwitchInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uuid != null && Object.hasOwnProperty.call(message, "uuid")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uuid); + if (message.attestationCertificateChain != null && Object.hasOwnProperty.call(message, "attestationCertificateChain")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.attestationCertificateChain); + if (message.attestationReport != null && Object.hasOwnProperty.call(message, "attestationReport")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.attestationReport); + return writer; + }; + + /** + * Encodes the specified SwitchInfo message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo + * @static + * @param {google.cloud.confidentialcomputing.v1.NvidiaAttestation.ISwitchInfo} message SwitchInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SwitchInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SwitchInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo} SwitchInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SwitchInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.uuid = reader.string(); + break; + } + case 2: { + message.attestationCertificateChain = reader.bytes(); + break; + } + case 3: { + message.attestationReport = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SwitchInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo} SwitchInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SwitchInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SwitchInfo message. + * @function verify + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SwitchInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uuid != null && message.hasOwnProperty("uuid")) + if (!$util.isString(message.uuid)) + return "uuid: string expected"; + if (message.attestationCertificateChain != null && message.hasOwnProperty("attestationCertificateChain")) + if (!(message.attestationCertificateChain && typeof message.attestationCertificateChain.length === "number" || $util.isString(message.attestationCertificateChain))) + return "attestationCertificateChain: buffer expected"; + if (message.attestationReport != null && message.hasOwnProperty("attestationReport")) + if (!(message.attestationReport && typeof message.attestationReport.length === "number" || $util.isString(message.attestationReport))) + return "attestationReport: buffer expected"; + return null; + }; + + /** + * Creates a SwitchInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo} SwitchInfo + */ + SwitchInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo) + return object; + var message = new $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo(); + if (object.uuid != null) + message.uuid = String(object.uuid); + if (object.attestationCertificateChain != null) + if (typeof object.attestationCertificateChain === "string") + $util.base64.decode(object.attestationCertificateChain, message.attestationCertificateChain = $util.newBuffer($util.base64.length(object.attestationCertificateChain)), 0); + else if (object.attestationCertificateChain.length >= 0) + message.attestationCertificateChain = object.attestationCertificateChain; + if (object.attestationReport != null) + if (typeof object.attestationReport === "string") + $util.base64.decode(object.attestationReport, message.attestationReport = $util.newBuffer($util.base64.length(object.attestationReport)), 0); + else if (object.attestationReport.length >= 0) + message.attestationReport = object.attestationReport; + return message; + }; + + /** + * Creates a plain object from a SwitchInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo + * @static + * @param {google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo} message SwitchInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SwitchInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.uuid = ""; + if (options.bytes === String) + object.attestationCertificateChain = ""; + else { + object.attestationCertificateChain = []; + if (options.bytes !== Array) + object.attestationCertificateChain = $util.newBuffer(object.attestationCertificateChain); + } + if (options.bytes === String) + object.attestationReport = ""; + else { + object.attestationReport = []; + if (options.bytes !== Array) + object.attestationReport = $util.newBuffer(object.attestationReport); + } + } + if (message.uuid != null && message.hasOwnProperty("uuid")) + object.uuid = message.uuid; + if (message.attestationCertificateChain != null && message.hasOwnProperty("attestationCertificateChain")) + object.attestationCertificateChain = options.bytes === String ? $util.base64.encode(message.attestationCertificateChain, 0, message.attestationCertificateChain.length) : options.bytes === Array ? Array.prototype.slice.call(message.attestationCertificateChain) : message.attestationCertificateChain; + if (message.attestationReport != null && message.hasOwnProperty("attestationReport")) + object.attestationReport = options.bytes === String ? $util.base64.encode(message.attestationReport, 0, message.attestationReport.length) : options.bytes === Array ? Array.prototype.slice.call(message.attestationReport) : message.attestationReport; + return object; + }; + + /** + * Converts this SwitchInfo to JSON. + * @function toJSON + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo + * @instance + * @returns {Object.} JSON object + */ + SwitchInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SwitchInfo + * @function getTypeUrl + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SwitchInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo"; + }; + + return SwitchInfo; + })(); + + NvidiaAttestation.SinglePassthroughAttestation = (function() { + + /** + * Properties of a SinglePassthroughAttestation. + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation + * @interface ISinglePassthroughAttestation + * @property {google.cloud.confidentialcomputing.v1.NvidiaAttestation.IGpuInfo|null} [gpuQuote] SinglePassthroughAttestation gpuQuote + */ + + /** + * Constructs a new SinglePassthroughAttestation. + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation + * @classdesc Represents a SinglePassthroughAttestation. + * @implements ISinglePassthroughAttestation + * @constructor + * @param {google.cloud.confidentialcomputing.v1.NvidiaAttestation.ISinglePassthroughAttestation=} [properties] Properties to set + */ + function SinglePassthroughAttestation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SinglePassthroughAttestation gpuQuote. + * @member {google.cloud.confidentialcomputing.v1.NvidiaAttestation.IGpuInfo|null|undefined} gpuQuote + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation + * @instance + */ + SinglePassthroughAttestation.prototype.gpuQuote = null; + + /** + * Creates a new SinglePassthroughAttestation instance using the specified properties. + * @function create + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation + * @static + * @param {google.cloud.confidentialcomputing.v1.NvidiaAttestation.ISinglePassthroughAttestation=} [properties] Properties to set + * @returns {google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation} SinglePassthroughAttestation instance + */ + SinglePassthroughAttestation.create = function create(properties) { + return new SinglePassthroughAttestation(properties); + }; + + /** + * Encodes the specified SinglePassthroughAttestation message. Does not implicitly {@link google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation.verify|verify} messages. + * @function encode + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation + * @static + * @param {google.cloud.confidentialcomputing.v1.NvidiaAttestation.ISinglePassthroughAttestation} message SinglePassthroughAttestation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SinglePassthroughAttestation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gpuQuote != null && Object.hasOwnProperty.call(message, "gpuQuote")) + $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo.encode(message.gpuQuote, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SinglePassthroughAttestation message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation + * @static + * @param {google.cloud.confidentialcomputing.v1.NvidiaAttestation.ISinglePassthroughAttestation} message SinglePassthroughAttestation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SinglePassthroughAttestation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SinglePassthroughAttestation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation} SinglePassthroughAttestation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SinglePassthroughAttestation.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.gpuQuote = $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SinglePassthroughAttestation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation} SinglePassthroughAttestation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SinglePassthroughAttestation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SinglePassthroughAttestation message. + * @function verify + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SinglePassthroughAttestation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.gpuQuote != null && message.hasOwnProperty("gpuQuote")) { + var error = $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo.verify(message.gpuQuote); + if (error) + return "gpuQuote." + error; + } + return null; + }; + + /** + * Creates a SinglePassthroughAttestation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation} SinglePassthroughAttestation + */ + SinglePassthroughAttestation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation) + return object; + var message = new $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation(); + if (object.gpuQuote != null) { + if (typeof object.gpuQuote !== "object") + throw TypeError(".google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation.gpuQuote: object expected"); + message.gpuQuote = $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo.fromObject(object.gpuQuote); + } + return message; + }; + + /** + * Creates a plain object from a SinglePassthroughAttestation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation + * @static + * @param {google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation} message SinglePassthroughAttestation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SinglePassthroughAttestation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.gpuQuote = null; + if (message.gpuQuote != null && message.hasOwnProperty("gpuQuote")) + object.gpuQuote = $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo.toObject(message.gpuQuote, options); + return object; + }; + + /** + * Converts this SinglePassthroughAttestation to JSON. + * @function toJSON + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation + * @instance + * @returns {Object.} JSON object + */ + SinglePassthroughAttestation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SinglePassthroughAttestation + * @function getTypeUrl + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SinglePassthroughAttestation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.confidentialcomputing.v1.NvidiaAttestation.SinglePassthroughAttestation"; + }; + + return SinglePassthroughAttestation; + })(); + + NvidiaAttestation.ProtectedPcieAttestation = (function() { + + /** + * Properties of a ProtectedPcieAttestation. + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation + * @interface IProtectedPcieAttestation + * @property {Array.|null} [gpuQuotes] ProtectedPcieAttestation gpuQuotes + * @property {Array.|null} [switchQuotes] ProtectedPcieAttestation switchQuotes + */ + + /** + * Constructs a new ProtectedPcieAttestation. + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation + * @classdesc Represents a ProtectedPcieAttestation. + * @implements IProtectedPcieAttestation + * @constructor + * @param {google.cloud.confidentialcomputing.v1.NvidiaAttestation.IProtectedPcieAttestation=} [properties] Properties to set + */ + function ProtectedPcieAttestation(properties) { + this.gpuQuotes = []; + this.switchQuotes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProtectedPcieAttestation gpuQuotes. + * @member {Array.} gpuQuotes + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation + * @instance + */ + ProtectedPcieAttestation.prototype.gpuQuotes = $util.emptyArray; + + /** + * ProtectedPcieAttestation switchQuotes. + * @member {Array.} switchQuotes + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation + * @instance + */ + ProtectedPcieAttestation.prototype.switchQuotes = $util.emptyArray; + + /** + * Creates a new ProtectedPcieAttestation instance using the specified properties. + * @function create + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation + * @static + * @param {google.cloud.confidentialcomputing.v1.NvidiaAttestation.IProtectedPcieAttestation=} [properties] Properties to set + * @returns {google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation} ProtectedPcieAttestation instance + */ + ProtectedPcieAttestation.create = function create(properties) { + return new ProtectedPcieAttestation(properties); + }; + + /** + * Encodes the specified ProtectedPcieAttestation message. Does not implicitly {@link google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation.verify|verify} messages. + * @function encode + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation + * @static + * @param {google.cloud.confidentialcomputing.v1.NvidiaAttestation.IProtectedPcieAttestation} message ProtectedPcieAttestation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProtectedPcieAttestation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gpuQuotes != null && message.gpuQuotes.length) + for (var i = 0; i < message.gpuQuotes.length; ++i) + $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo.encode(message.gpuQuotes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.switchQuotes != null && message.switchQuotes.length) + for (var i = 0; i < message.switchQuotes.length; ++i) + $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo.encode(message.switchQuotes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ProtectedPcieAttestation message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation + * @static + * @param {google.cloud.confidentialcomputing.v1.NvidiaAttestation.IProtectedPcieAttestation} message ProtectedPcieAttestation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProtectedPcieAttestation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProtectedPcieAttestation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation} ProtectedPcieAttestation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProtectedPcieAttestation.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.gpuQuotes && message.gpuQuotes.length)) + message.gpuQuotes = []; + message.gpuQuotes.push($root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.switchQuotes && message.switchQuotes.length)) + message.switchQuotes = []; + message.switchQuotes.push($root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProtectedPcieAttestation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation} ProtectedPcieAttestation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProtectedPcieAttestation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProtectedPcieAttestation message. + * @function verify + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProtectedPcieAttestation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.gpuQuotes != null && message.hasOwnProperty("gpuQuotes")) { + if (!Array.isArray(message.gpuQuotes)) + return "gpuQuotes: array expected"; + for (var i = 0; i < message.gpuQuotes.length; ++i) { + var error = $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo.verify(message.gpuQuotes[i]); + if (error) + return "gpuQuotes." + error; + } + } + if (message.switchQuotes != null && message.hasOwnProperty("switchQuotes")) { + if (!Array.isArray(message.switchQuotes)) + return "switchQuotes: array expected"; + for (var i = 0; i < message.switchQuotes.length; ++i) { + var error = $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo.verify(message.switchQuotes[i]); + if (error) + return "switchQuotes." + error; + } + } + return null; + }; + + /** + * Creates a ProtectedPcieAttestation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation} ProtectedPcieAttestation + */ + ProtectedPcieAttestation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation) + return object; + var message = new $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation(); + if (object.gpuQuotes) { + if (!Array.isArray(object.gpuQuotes)) + throw TypeError(".google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation.gpuQuotes: array expected"); + message.gpuQuotes = []; + for (var i = 0; i < object.gpuQuotes.length; ++i) { + if (typeof object.gpuQuotes[i] !== "object") + throw TypeError(".google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation.gpuQuotes: object expected"); + message.gpuQuotes[i] = $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo.fromObject(object.gpuQuotes[i]); + } + } + if (object.switchQuotes) { + if (!Array.isArray(object.switchQuotes)) + throw TypeError(".google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation.switchQuotes: array expected"); + message.switchQuotes = []; + for (var i = 0; i < object.switchQuotes.length; ++i) { + if (typeof object.switchQuotes[i] !== "object") + throw TypeError(".google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation.switchQuotes: object expected"); + message.switchQuotes[i] = $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo.fromObject(object.switchQuotes[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ProtectedPcieAttestation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation + * @static + * @param {google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation} message ProtectedPcieAttestation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProtectedPcieAttestation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.gpuQuotes = []; + object.switchQuotes = []; + } + if (message.gpuQuotes && message.gpuQuotes.length) { + object.gpuQuotes = []; + for (var j = 0; j < message.gpuQuotes.length; ++j) + object.gpuQuotes[j] = $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo.toObject(message.gpuQuotes[j], options); + } + if (message.switchQuotes && message.switchQuotes.length) { + object.switchQuotes = []; + for (var j = 0; j < message.switchQuotes.length; ++j) + object.switchQuotes[j] = $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.SwitchInfo.toObject(message.switchQuotes[j], options); + } + return object; + }; + + /** + * Converts this ProtectedPcieAttestation to JSON. + * @function toJSON + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation + * @instance + * @returns {Object.} JSON object + */ + ProtectedPcieAttestation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProtectedPcieAttestation + * @function getTypeUrl + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProtectedPcieAttestation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.confidentialcomputing.v1.NvidiaAttestation.ProtectedPcieAttestation"; + }; + + return ProtectedPcieAttestation; + })(); + + NvidiaAttestation.MultiGpuSecurePassthroughAttestation = (function() { + + /** + * Properties of a MultiGpuSecurePassthroughAttestation. + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation + * @interface IMultiGpuSecurePassthroughAttestation + * @property {Array.|null} [gpuQuotes] MultiGpuSecurePassthroughAttestation gpuQuotes + */ + + /** + * Constructs a new MultiGpuSecurePassthroughAttestation. + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation + * @classdesc Represents a MultiGpuSecurePassthroughAttestation. + * @implements IMultiGpuSecurePassthroughAttestation + * @constructor + * @param {google.cloud.confidentialcomputing.v1.NvidiaAttestation.IMultiGpuSecurePassthroughAttestation=} [properties] Properties to set + */ + function MultiGpuSecurePassthroughAttestation(properties) { + this.gpuQuotes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MultiGpuSecurePassthroughAttestation gpuQuotes. + * @member {Array.} gpuQuotes + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation + * @instance + */ + MultiGpuSecurePassthroughAttestation.prototype.gpuQuotes = $util.emptyArray; + + /** + * Creates a new MultiGpuSecurePassthroughAttestation instance using the specified properties. + * @function create + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation + * @static + * @param {google.cloud.confidentialcomputing.v1.NvidiaAttestation.IMultiGpuSecurePassthroughAttestation=} [properties] Properties to set + * @returns {google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation} MultiGpuSecurePassthroughAttestation instance + */ + MultiGpuSecurePassthroughAttestation.create = function create(properties) { + return new MultiGpuSecurePassthroughAttestation(properties); + }; + + /** + * Encodes the specified MultiGpuSecurePassthroughAttestation message. Does not implicitly {@link google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation.verify|verify} messages. + * @function encode + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation + * @static + * @param {google.cloud.confidentialcomputing.v1.NvidiaAttestation.IMultiGpuSecurePassthroughAttestation} message MultiGpuSecurePassthroughAttestation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MultiGpuSecurePassthroughAttestation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gpuQuotes != null && message.gpuQuotes.length) + for (var i = 0; i < message.gpuQuotes.length; ++i) + $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo.encode(message.gpuQuotes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MultiGpuSecurePassthroughAttestation message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation + * @static + * @param {google.cloud.confidentialcomputing.v1.NvidiaAttestation.IMultiGpuSecurePassthroughAttestation} message MultiGpuSecurePassthroughAttestation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MultiGpuSecurePassthroughAttestation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MultiGpuSecurePassthroughAttestation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation} MultiGpuSecurePassthroughAttestation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MultiGpuSecurePassthroughAttestation.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.gpuQuotes && message.gpuQuotes.length)) + message.gpuQuotes = []; + message.gpuQuotes.push($root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MultiGpuSecurePassthroughAttestation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation} MultiGpuSecurePassthroughAttestation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MultiGpuSecurePassthroughAttestation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MultiGpuSecurePassthroughAttestation message. + * @function verify + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MultiGpuSecurePassthroughAttestation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.gpuQuotes != null && message.hasOwnProperty("gpuQuotes")) { + if (!Array.isArray(message.gpuQuotes)) + return "gpuQuotes: array expected"; + for (var i = 0; i < message.gpuQuotes.length; ++i) { + var error = $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo.verify(message.gpuQuotes[i]); + if (error) + return "gpuQuotes." + error; + } } - } - return message; - }; - - /** - * Decodes a VerifyAttestationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.confidentialcomputing.v1.VerifyAttestationRequest} VerifyAttestationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VerifyAttestationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return null; + }; - /** - * Verifies a VerifyAttestationRequest message. - * @function verify - * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VerifyAttestationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.tdCcel != null && message.hasOwnProperty("tdCcel")) { - properties.teeAttestation = 1; - { - var error = $root.google.cloud.confidentialcomputing.v1.TdxCcelAttestation.verify(message.tdCcel); - if (error) - return "tdCcel." + error; - } - } - if (message.sevSnpAttestation != null && message.hasOwnProperty("sevSnpAttestation")) { - if (properties.teeAttestation === 1) - return "teeAttestation: multiple values"; - properties.teeAttestation = 1; - { - var error = $root.google.cloud.confidentialcomputing.v1.SevSnpAttestation.verify(message.sevSnpAttestation); - if (error) - return "sevSnpAttestation." + error; + /** + * Creates a MultiGpuSecurePassthroughAttestation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation} MultiGpuSecurePassthroughAttestation + */ + MultiGpuSecurePassthroughAttestation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation) + return object; + var message = new $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation(); + if (object.gpuQuotes) { + if (!Array.isArray(object.gpuQuotes)) + throw TypeError(".google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation.gpuQuotes: array expected"); + message.gpuQuotes = []; + for (var i = 0; i < object.gpuQuotes.length; ++i) { + if (typeof object.gpuQuotes[i] !== "object") + throw TypeError(".google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation.gpuQuotes: object expected"); + message.gpuQuotes[i] = $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo.fromObject(object.gpuQuotes[i]); + } } - } - if (message.challenge != null && message.hasOwnProperty("challenge")) - if (!$util.isString(message.challenge)) - return "challenge: string expected"; - if (message.gcpCredentials != null && message.hasOwnProperty("gcpCredentials")) { - var error = $root.google.cloud.confidentialcomputing.v1.GcpCredentials.verify(message.gcpCredentials); - if (error) - return "gcpCredentials." + error; - } - if (message.tpmAttestation != null && message.hasOwnProperty("tpmAttestation")) { - var error = $root.google.cloud.confidentialcomputing.v1.TpmAttestation.verify(message.tpmAttestation); - if (error) - return "tpmAttestation." + error; - } - if (message.confidentialSpaceInfo != null && message.hasOwnProperty("confidentialSpaceInfo")) { - var error = $root.google.cloud.confidentialcomputing.v1.ConfidentialSpaceInfo.verify(message.confidentialSpaceInfo); - if (error) - return "confidentialSpaceInfo." + error; - } - if (message.tokenOptions != null && message.hasOwnProperty("tokenOptions")) { - var error = $root.google.cloud.confidentialcomputing.v1.TokenOptions.verify(message.tokenOptions); - if (error) - return "tokenOptions." + error; - } - if (message.attester != null && message.hasOwnProperty("attester")) - if (!$util.isString(message.attester)) - return "attester: string expected"; - return null; - }; + return message; + }; - /** - * Creates a VerifyAttestationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.confidentialcomputing.v1.VerifyAttestationRequest} VerifyAttestationRequest - */ - VerifyAttestationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.confidentialcomputing.v1.VerifyAttestationRequest) + /** + * Creates a plain object from a MultiGpuSecurePassthroughAttestation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation + * @static + * @param {google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation} message MultiGpuSecurePassthroughAttestation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MultiGpuSecurePassthroughAttestation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.gpuQuotes = []; + if (message.gpuQuotes && message.gpuQuotes.length) { + object.gpuQuotes = []; + for (var j = 0; j < message.gpuQuotes.length; ++j) + object.gpuQuotes[j] = $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuInfo.toObject(message.gpuQuotes[j], options); + } return object; - var message = new $root.google.cloud.confidentialcomputing.v1.VerifyAttestationRequest(); - if (object.tdCcel != null) { - if (typeof object.tdCcel !== "object") - throw TypeError(".google.cloud.confidentialcomputing.v1.VerifyAttestationRequest.tdCcel: object expected"); - message.tdCcel = $root.google.cloud.confidentialcomputing.v1.TdxCcelAttestation.fromObject(object.tdCcel); - } - if (object.sevSnpAttestation != null) { - if (typeof object.sevSnpAttestation !== "object") - throw TypeError(".google.cloud.confidentialcomputing.v1.VerifyAttestationRequest.sevSnpAttestation: object expected"); - message.sevSnpAttestation = $root.google.cloud.confidentialcomputing.v1.SevSnpAttestation.fromObject(object.sevSnpAttestation); - } - if (object.challenge != null) - message.challenge = String(object.challenge); - if (object.gcpCredentials != null) { - if (typeof object.gcpCredentials !== "object") - throw TypeError(".google.cloud.confidentialcomputing.v1.VerifyAttestationRequest.gcpCredentials: object expected"); - message.gcpCredentials = $root.google.cloud.confidentialcomputing.v1.GcpCredentials.fromObject(object.gcpCredentials); - } - if (object.tpmAttestation != null) { - if (typeof object.tpmAttestation !== "object") - throw TypeError(".google.cloud.confidentialcomputing.v1.VerifyAttestationRequest.tpmAttestation: object expected"); - message.tpmAttestation = $root.google.cloud.confidentialcomputing.v1.TpmAttestation.fromObject(object.tpmAttestation); - } - if (object.confidentialSpaceInfo != null) { - if (typeof object.confidentialSpaceInfo !== "object") - throw TypeError(".google.cloud.confidentialcomputing.v1.VerifyAttestationRequest.confidentialSpaceInfo: object expected"); - message.confidentialSpaceInfo = $root.google.cloud.confidentialcomputing.v1.ConfidentialSpaceInfo.fromObject(object.confidentialSpaceInfo); - } - if (object.tokenOptions != null) { - if (typeof object.tokenOptions !== "object") - throw TypeError(".google.cloud.confidentialcomputing.v1.VerifyAttestationRequest.tokenOptions: object expected"); - message.tokenOptions = $root.google.cloud.confidentialcomputing.v1.TokenOptions.fromObject(object.tokenOptions); - } - if (object.attester != null) - message.attester = String(object.attester); - return message; - }; + }; - /** - * Creates a plain object from a VerifyAttestationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationRequest - * @static - * @param {google.cloud.confidentialcomputing.v1.VerifyAttestationRequest} message VerifyAttestationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VerifyAttestationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.challenge = ""; - object.gcpCredentials = null; - object.tpmAttestation = null; - object.confidentialSpaceInfo = null; - object.tokenOptions = null; - object.attester = ""; - } - if (message.challenge != null && message.hasOwnProperty("challenge")) - object.challenge = message.challenge; - if (message.gcpCredentials != null && message.hasOwnProperty("gcpCredentials")) - object.gcpCredentials = $root.google.cloud.confidentialcomputing.v1.GcpCredentials.toObject(message.gcpCredentials, options); - if (message.tpmAttestation != null && message.hasOwnProperty("tpmAttestation")) - object.tpmAttestation = $root.google.cloud.confidentialcomputing.v1.TpmAttestation.toObject(message.tpmAttestation, options); - if (message.confidentialSpaceInfo != null && message.hasOwnProperty("confidentialSpaceInfo")) - object.confidentialSpaceInfo = $root.google.cloud.confidentialcomputing.v1.ConfidentialSpaceInfo.toObject(message.confidentialSpaceInfo, options); - if (message.tokenOptions != null && message.hasOwnProperty("tokenOptions")) - object.tokenOptions = $root.google.cloud.confidentialcomputing.v1.TokenOptions.toObject(message.tokenOptions, options); - if (message.tdCcel != null && message.hasOwnProperty("tdCcel")) { - object.tdCcel = $root.google.cloud.confidentialcomputing.v1.TdxCcelAttestation.toObject(message.tdCcel, options); - if (options.oneofs) - object.teeAttestation = "tdCcel"; - } - if (message.sevSnpAttestation != null && message.hasOwnProperty("sevSnpAttestation")) { - object.sevSnpAttestation = $root.google.cloud.confidentialcomputing.v1.SevSnpAttestation.toObject(message.sevSnpAttestation, options); - if (options.oneofs) - object.teeAttestation = "sevSnpAttestation"; - } - if (message.attester != null && message.hasOwnProperty("attester")) - object.attester = message.attester; - return object; - }; + /** + * Converts this MultiGpuSecurePassthroughAttestation to JSON. + * @function toJSON + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation + * @instance + * @returns {Object.} JSON object + */ + MultiGpuSecurePassthroughAttestation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this VerifyAttestationRequest to JSON. - * @function toJSON - * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationRequest - * @instance - * @returns {Object.} JSON object - */ - VerifyAttestationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for MultiGpuSecurePassthroughAttestation + * @function getTypeUrl + * @memberof google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MultiGpuSecurePassthroughAttestation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.confidentialcomputing.v1.NvidiaAttestation.MultiGpuSecurePassthroughAttestation"; + }; + + return MultiGpuSecurePassthroughAttestation; + })(); /** - * Gets the default type url for VerifyAttestationRequest - * @function getTypeUrl - * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * GpuArchitectureType enum. + * @name google.cloud.confidentialcomputing.v1.NvidiaAttestation.GpuArchitectureType + * @enum {number} + * @property {number} GPU_ARCHITECTURE_TYPE_UNSPECIFIED=0 GPU_ARCHITECTURE_TYPE_UNSPECIFIED value + * @property {number} GPU_ARCHITECTURE_TYPE_HOPPER=8 GPU_ARCHITECTURE_TYPE_HOPPER value + * @property {number} GPU_ARCHITECTURE_TYPE_BLACKWELL=10 GPU_ARCHITECTURE_TYPE_BLACKWELL value */ - VerifyAttestationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.confidentialcomputing.v1.VerifyAttestationRequest"; - }; + NvidiaAttestation.GpuArchitectureType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GPU_ARCHITECTURE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[8] = "GPU_ARCHITECTURE_TYPE_HOPPER"] = 8; + values[valuesById[10] = "GPU_ARCHITECTURE_TYPE_BLACKWELL"] = 10; + return values; + })(); - return VerifyAttestationRequest; + return NvidiaAttestation; })(); v1.TdxCcelAttestation = (function() { @@ -4788,6 +6487,7 @@ * @property {Array.|null} [signedEntities] VerifyConfidentialSpaceRequest signedEntities * @property {google.cloud.confidentialcomputing.v1.IGceShieldedIdentity|null} [gceShieldedIdentity] VerifyConfidentialSpaceRequest gceShieldedIdentity * @property {google.cloud.confidentialcomputing.v1.VerifyConfidentialSpaceRequest.IConfidentialSpaceOptions|null} [options] VerifyConfidentialSpaceRequest options + * @property {google.cloud.confidentialcomputing.v1.INvidiaAttestation|null} [nvidiaAttestation] VerifyConfidentialSpaceRequest nvidiaAttestation */ /** @@ -4855,12 +6555,20 @@ VerifyConfidentialSpaceRequest.prototype.gceShieldedIdentity = null; /** - * VerifyConfidentialSpaceRequest options. - * @member {google.cloud.confidentialcomputing.v1.VerifyConfidentialSpaceRequest.IConfidentialSpaceOptions|null|undefined} options + * VerifyConfidentialSpaceRequest options. + * @member {google.cloud.confidentialcomputing.v1.VerifyConfidentialSpaceRequest.IConfidentialSpaceOptions|null|undefined} options + * @memberof google.cloud.confidentialcomputing.v1.VerifyConfidentialSpaceRequest + * @instance + */ + VerifyConfidentialSpaceRequest.prototype.options = null; + + /** + * VerifyConfidentialSpaceRequest nvidiaAttestation. + * @member {google.cloud.confidentialcomputing.v1.INvidiaAttestation|null|undefined} nvidiaAttestation * @memberof google.cloud.confidentialcomputing.v1.VerifyConfidentialSpaceRequest * @instance */ - VerifyConfidentialSpaceRequest.prototype.options = null; + VerifyConfidentialSpaceRequest.prototype.nvidiaAttestation = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -4915,6 +6623,8 @@ $root.google.cloud.confidentialcomputing.v1.GceShieldedIdentity.encode(message.gceShieldedIdentity, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.options != null && Object.hasOwnProperty.call(message, "options")) $root.google.cloud.confidentialcomputing.v1.VerifyConfidentialSpaceRequest.ConfidentialSpaceOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.nvidiaAttestation != null && Object.hasOwnProperty.call(message, "nvidiaAttestation")) + $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.encode(message.nvidiaAttestation, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; @@ -4981,6 +6691,10 @@ message.options = $root.google.cloud.confidentialcomputing.v1.VerifyConfidentialSpaceRequest.ConfidentialSpaceOptions.decode(reader, reader.uint32()); break; } + case 8: { + message.nvidiaAttestation = $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -5062,6 +6776,11 @@ if (error) return "options." + error; } + if (message.nvidiaAttestation != null && message.hasOwnProperty("nvidiaAttestation")) { + var error = $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.verify(message.nvidiaAttestation); + if (error) + return "nvidiaAttestation." + error; + } return null; }; @@ -5114,6 +6833,11 @@ throw TypeError(".google.cloud.confidentialcomputing.v1.VerifyConfidentialSpaceRequest.options: object expected"); message.options = $root.google.cloud.confidentialcomputing.v1.VerifyConfidentialSpaceRequest.ConfidentialSpaceOptions.fromObject(object.options); } + if (object.nvidiaAttestation != null) { + if (typeof object.nvidiaAttestation !== "object") + throw TypeError(".google.cloud.confidentialcomputing.v1.VerifyConfidentialSpaceRequest.nvidiaAttestation: object expected"); + message.nvidiaAttestation = $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.fromObject(object.nvidiaAttestation); + } return message; }; @@ -5137,6 +6861,7 @@ object.gcpCredentials = null; object.gceShieldedIdentity = null; object.options = null; + object.nvidiaAttestation = null; } if (message.challenge != null && message.hasOwnProperty("challenge")) object.challenge = message.challenge; @@ -5161,6 +6886,8 @@ object.gceShieldedIdentity = $root.google.cloud.confidentialcomputing.v1.GceShieldedIdentity.toObject(message.gceShieldedIdentity, options); if (message.options != null && message.hasOwnProperty("options")) object.options = $root.google.cloud.confidentialcomputing.v1.VerifyConfidentialSpaceRequest.ConfidentialSpaceOptions.toObject(message.options, options); + if (message.nvidiaAttestation != null && message.hasOwnProperty("nvidiaAttestation")) + object.nvidiaAttestation = $root.google.cloud.confidentialcomputing.v1.NvidiaAttestation.toObject(message.nvidiaAttestation, options); return object; }; @@ -6096,6 +7823,7 @@ * @interface IVerifyConfidentialGkeRequest * @property {google.cloud.confidentialcomputing.v1.ITpmAttestation|null} [tpmAttestation] VerifyConfidentialGkeRequest tpmAttestation * @property {string|null} [challenge] VerifyConfidentialGkeRequest challenge + * @property {google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.IConfidentialGkeOptions|null} [options] VerifyConfidentialGkeRequest options */ /** @@ -6129,6 +7857,14 @@ */ VerifyConfidentialGkeRequest.prototype.challenge = ""; + /** + * VerifyConfidentialGkeRequest options. + * @member {google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.IConfidentialGkeOptions|null|undefined} options + * @memberof google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest + * @instance + */ + VerifyConfidentialGkeRequest.prototype.options = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -6171,6 +7907,8 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.challenge); if (message.tpmAttestation != null && Object.hasOwnProperty.call(message, "tpmAttestation")) $root.google.cloud.confidentialcomputing.v1.TpmAttestation.encode(message.tpmAttestation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -6215,6 +7953,10 @@ message.challenge = reader.string(); break; } + case 3: { + message.options = $root.google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -6262,6 +8004,11 @@ if (message.challenge != null && message.hasOwnProperty("challenge")) if (!$util.isString(message.challenge)) return "challenge: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions.verify(message.options); + if (error) + return "options." + error; + } return null; }; @@ -6284,6 +8031,11 @@ } if (object.challenge != null) message.challenge = String(object.challenge); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.options: object expected"); + message.options = $root.google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions.fromObject(object.options); + } return message; }; @@ -6300,8 +8052,10 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.challenge = ""; + object.options = null; + } if (message.challenge != null && message.hasOwnProperty("challenge")) object.challenge = message.challenge; if (message.tpmAttestation != null && message.hasOwnProperty("tpmAttestation")) { @@ -6309,6 +8063,8 @@ if (options.oneofs) object.teeAttestation = "tpmAttestation"; } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions.toObject(message.options, options); return object; }; @@ -6338,6 +8094,299 @@ return typeUrlPrefix + "/google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest"; }; + VerifyConfidentialGkeRequest.ConfidentialGkeOptions = (function() { + + /** + * Properties of a ConfidentialGkeOptions. + * @memberof google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest + * @interface IConfidentialGkeOptions + * @property {string|null} [audience] ConfidentialGkeOptions audience + * @property {Array.|null} [nonce] ConfidentialGkeOptions nonce + * @property {google.cloud.confidentialcomputing.v1.SignatureType|null} [signatureType] ConfidentialGkeOptions signatureType + */ + + /** + * Constructs a new ConfidentialGkeOptions. + * @memberof google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest + * @classdesc Represents a ConfidentialGkeOptions. + * @implements IConfidentialGkeOptions + * @constructor + * @param {google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.IConfidentialGkeOptions=} [properties] Properties to set + */ + function ConfidentialGkeOptions(properties) { + this.nonce = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConfidentialGkeOptions audience. + * @member {string} audience + * @memberof google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions + * @instance + */ + ConfidentialGkeOptions.prototype.audience = ""; + + /** + * ConfidentialGkeOptions nonce. + * @member {Array.} nonce + * @memberof google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions + * @instance + */ + ConfidentialGkeOptions.prototype.nonce = $util.emptyArray; + + /** + * ConfidentialGkeOptions signatureType. + * @member {google.cloud.confidentialcomputing.v1.SignatureType} signatureType + * @memberof google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions + * @instance + */ + ConfidentialGkeOptions.prototype.signatureType = 0; + + /** + * Creates a new ConfidentialGkeOptions instance using the specified properties. + * @function create + * @memberof google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions + * @static + * @param {google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.IConfidentialGkeOptions=} [properties] Properties to set + * @returns {google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions} ConfidentialGkeOptions instance + */ + ConfidentialGkeOptions.create = function create(properties) { + return new ConfidentialGkeOptions(properties); + }; + + /** + * Encodes the specified ConfidentialGkeOptions message. Does not implicitly {@link google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions + * @static + * @param {google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.IConfidentialGkeOptions} message ConfidentialGkeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfidentialGkeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.audience != null && Object.hasOwnProperty.call(message, "audience")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.audience); + if (message.nonce != null && message.nonce.length) + for (var i = 0; i < message.nonce.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nonce[i]); + if (message.signatureType != null && Object.hasOwnProperty.call(message, "signatureType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.signatureType); + return writer; + }; + + /** + * Encodes the specified ConfidentialGkeOptions message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions + * @static + * @param {google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.IConfidentialGkeOptions} message ConfidentialGkeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfidentialGkeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConfidentialGkeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions} ConfidentialGkeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfidentialGkeOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.audience = reader.string(); + break; + } + case 3: { + if (!(message.nonce && message.nonce.length)) + message.nonce = []; + message.nonce.push(reader.string()); + break; + } + case 4: { + message.signatureType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConfidentialGkeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions} ConfidentialGkeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfidentialGkeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConfidentialGkeOptions message. + * @function verify + * @memberof google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConfidentialGkeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.audience != null && message.hasOwnProperty("audience")) + if (!$util.isString(message.audience)) + return "audience: string expected"; + if (message.nonce != null && message.hasOwnProperty("nonce")) { + if (!Array.isArray(message.nonce)) + return "nonce: array expected"; + for (var i = 0; i < message.nonce.length; ++i) + if (!$util.isString(message.nonce[i])) + return "nonce: string[] expected"; + } + if (message.signatureType != null && message.hasOwnProperty("signatureType")) + switch (message.signatureType) { + default: + return "signatureType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a ConfidentialGkeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions} ConfidentialGkeOptions + */ + ConfidentialGkeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions) + return object; + var message = new $root.google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions(); + if (object.audience != null) + message.audience = String(object.audience); + if (object.nonce) { + if (!Array.isArray(object.nonce)) + throw TypeError(".google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions.nonce: array expected"); + message.nonce = []; + for (var i = 0; i < object.nonce.length; ++i) + message.nonce[i] = String(object.nonce[i]); + } + switch (object.signatureType) { + default: + if (typeof object.signatureType === "number") { + message.signatureType = object.signatureType; + break; + } + break; + case "SIGNATURE_TYPE_UNSPECIFIED": + case 0: + message.signatureType = 0; + break; + case "SIGNATURE_TYPE_OIDC": + case 1: + message.signatureType = 1; + break; + case "SIGNATURE_TYPE_PKI": + case 2: + message.signatureType = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a ConfidentialGkeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions + * @static + * @param {google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions} message ConfidentialGkeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConfidentialGkeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.nonce = []; + if (options.defaults) { + object.audience = ""; + object.signatureType = options.enums === String ? "SIGNATURE_TYPE_UNSPECIFIED" : 0; + } + if (message.audience != null && message.hasOwnProperty("audience")) + object.audience = message.audience; + if (message.nonce && message.nonce.length) { + object.nonce = []; + for (var j = 0; j < message.nonce.length; ++j) + object.nonce[j] = message.nonce[j]; + } + if (message.signatureType != null && message.hasOwnProperty("signatureType")) + object.signatureType = options.enums === String ? $root.google.cloud.confidentialcomputing.v1.SignatureType[message.signatureType] === undefined ? message.signatureType : $root.google.cloud.confidentialcomputing.v1.SignatureType[message.signatureType] : message.signatureType; + return object; + }; + + /** + * Converts this ConfidentialGkeOptions to JSON. + * @function toJSON + * @memberof google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions + * @instance + * @returns {Object.} JSON object + */ + ConfidentialGkeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConfidentialGkeOptions + * @function getTypeUrl + * @memberof google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConfidentialGkeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions"; + }; + + return ConfidentialGkeOptions; + })(); + return VerifyConfidentialGkeRequest; })(); diff --git a/packages/google-cloud-confidentialcomputing/protos/protos.json b/packages/google-cloud-confidentialcomputing/protos/protos.json index c9fca3493d4..414c0f9190c 100644 --- a/packages/google-cloud-confidentialcomputing/protos/protos.json +++ b/packages/google-cloud-confidentialcomputing/protos/protos.json @@ -193,6 +193,11 @@ "tdCcel", "sevSnpAttestation" ] + }, + "deviceAttestation": { + "oneof": [ + "nvidiaAttestation" + ] } }, "fields": { @@ -210,6 +215,13 @@ "(google.api.field_behavior)": "OPTIONAL" } }, + "nvidiaAttestation": { + "type": "NvidiaAttestation", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "challenge": { "type": "string", "id": 1, @@ -255,6 +267,154 @@ } } }, + "NvidiaAttestation": { + "oneofs": { + "ccFeature": { + "oneof": [ + "spt", + "ppcie", + "mpt" + ] + } + }, + "fields": { + "spt": { + "type": "SinglePassthroughAttestation", + "id": 1 + }, + "ppcie": { + "type": "ProtectedPcieAttestation", + "id": 2 + }, + "mpt": { + "type": "MultiGpuSecurePassthroughAttestation", + "id": 3 + } + }, + "nested": { + "GpuInfo": { + "fields": { + "uuid": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "driverVersion": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "vbiosVersion": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "gpuArchitectureType": { + "type": "GpuArchitectureType", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "attestationCertificateChain": { + "type": "bytes", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "attestationReport": { + "type": "bytes", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SwitchInfo": { + "fields": { + "uuid": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "attestationCertificateChain": { + "type": "bytes", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "attestationReport": { + "type": "bytes", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SinglePassthroughAttestation": { + "fields": { + "gpuQuote": { + "type": "GpuInfo", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ProtectedPcieAttestation": { + "fields": { + "gpuQuotes": { + "rule": "repeated", + "type": "GpuInfo", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "switchQuotes": { + "rule": "repeated", + "type": "SwitchInfo", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "MultiGpuSecurePassthroughAttestation": { + "fields": { + "gpuQuotes": { + "rule": "repeated", + "type": "GpuInfo", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GpuArchitectureType": { + "values": { + "GPU_ARCHITECTURE_TYPE_UNSPECIFIED": 0, + "GPU_ARCHITECTURE_TYPE_HOPPER": 8, + "GPU_ARCHITECTURE_TYPE_BLACKWELL": 10 + } + } + } + }, "TdxCcelAttestation": { "fields": { "ccelAcpiTable": { @@ -576,6 +736,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "nvidiaAttestation": { + "type": "NvidiaAttestation", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -686,6 +853,41 @@ "(google.api.field_behavior)": "REQUIRED", "(google.api.resource_reference).type": "confidentialcomputing.googleapis.com/Challenge" } + }, + "options": { + "type": "ConfidentialGkeOptions", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "ConfidentialGkeOptions": { + "fields": { + "audience": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "nonce": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "signatureType": { + "type": "SignatureType", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } } } }, diff --git a/packages/google-cloud-confidentialcomputing/samples/generated/v1/confidential_computing.verify_attestation.js b/packages/google-cloud-confidentialcomputing/samples/generated/v1/confidential_computing.verify_attestation.js index a57c4621127..af4c315203b 100644 --- a/packages/google-cloud-confidentialcomputing/samples/generated/v1/confidential_computing.verify_attestation.js +++ b/packages/google-cloud-confidentialcomputing/samples/generated/v1/confidential_computing.verify_attestation.js @@ -36,6 +36,10 @@ function main(challenge, tpmAttestation) { * Optional. An SEV-SNP Attestation Report. */ // const sevSnpAttestation = {} + /** + * Optional. An Nvidia attestation report for GPU and NVSwitch devices. + */ + // const nvidiaAttestation = {} /** * Required. The name of the Challenge whose nonce was used to generate the * attestation, in the format `projects/* /locations/* /challenges/*`. The diff --git a/packages/google-cloud-confidentialcomputing/samples/generated/v1/confidential_computing.verify_confidential_gke.js b/packages/google-cloud-confidentialcomputing/samples/generated/v1/confidential_computing.verify_confidential_gke.js index ec67c0e870f..2f2fb8917fa 100644 --- a/packages/google-cloud-confidentialcomputing/samples/generated/v1/confidential_computing.verify_confidential_gke.js +++ b/packages/google-cloud-confidentialcomputing/samples/generated/v1/confidential_computing.verify_confidential_gke.js @@ -39,6 +39,10 @@ function main(challenge) { * provided Challenge will be consumed, and cannot be used again. */ // const challenge = 'abc123' + /** + * Optional. A collection of fields that modify the token output. + */ + // const options = {} // Imports the Confidentialcomputing library const {ConfidentialComputingClient} = require('@google-cloud/confidentialcomputing').v1; diff --git a/packages/google-cloud-confidentialcomputing/samples/generated/v1/confidential_computing.verify_confidential_space.js b/packages/google-cloud-confidentialcomputing/samples/generated/v1/confidential_computing.verify_confidential_space.js index 7266fa717c2..a279b90ded2 100644 --- a/packages/google-cloud-confidentialcomputing/samples/generated/v1/confidential_computing.verify_confidential_space.js +++ b/packages/google-cloud-confidentialcomputing/samples/generated/v1/confidential_computing.verify_confidential_space.js @@ -63,6 +63,11 @@ function main(tdCcel, tpmAttestation, challenge) { * Optional. A collection of fields that modify the token output. */ // const options = {} + /** + * Optional. An optional Nvidia attestation report, used to populate hardware + * rooted claims for Nvidia devices. + */ + // const nvidiaAttestation = {} // Imports the Confidentialcomputing library const {ConfidentialComputingClient} = require('@google-cloud/confidentialcomputing').v1; diff --git a/packages/google-cloud-confidentialcomputing/samples/generated/v1/snippet_metadata_google.cloud.confidentialcomputing.v1.json b/packages/google-cloud-confidentialcomputing/samples/generated/v1/snippet_metadata_google.cloud.confidentialcomputing.v1.json index cd01d34f423..72a2b702579 100644 --- a/packages/google-cloud-confidentialcomputing/samples/generated/v1/snippet_metadata_google.cloud.confidentialcomputing.v1.json +++ b/packages/google-cloud-confidentialcomputing/samples/generated/v1/snippet_metadata_google.cloud.confidentialcomputing.v1.json @@ -66,7 +66,7 @@ "segments": [ { "start": 25, - "end": 88, + "end": 92, "type": "FULL" } ], @@ -83,6 +83,10 @@ "name": "sev_snp_attestation", "type": ".google.cloud.confidentialcomputing.v1.SevSnpAttestation" }, + { + "name": "nvidia_attestation", + "type": ".google.cloud.confidentialcomputing.v1.NvidiaAttestation" + }, { "name": "challenge", "type": "TYPE_STRING" @@ -134,7 +138,7 @@ "segments": [ { "start": 25, - "end": 86, + "end": 91, "type": "FULL" } ], @@ -170,6 +174,10 @@ { "name": "options", "type": ".google.cloud.confidentialcomputing.v1.VerifyConfidentialSpaceRequest.ConfidentialSpaceOptions" + }, + { + "name": "nvidia_attestation", + "type": ".google.cloud.confidentialcomputing.v1.NvidiaAttestation" } ], "resultType": ".google.cloud.confidentialcomputing.v1.VerifyConfidentialSpaceResponse", @@ -198,7 +206,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 64, "type": "FULL" } ], @@ -214,6 +222,10 @@ { "name": "challenge", "type": "TYPE_STRING" + }, + { + "name": "options", + "type": ".google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions" } ], "resultType": ".google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeResponse", diff --git a/packages/google-cloud-confidentialcomputing/src/v1/confidential_computing_client.ts b/packages/google-cloud-confidentialcomputing/src/v1/confidential_computing_client.ts index 9614ea6672f..1903c28b083 100644 --- a/packages/google-cloud-confidentialcomputing/src/v1/confidential_computing_client.ts +++ b/packages/google-cloud-confidentialcomputing/src/v1/confidential_computing_client.ts @@ -444,6 +444,8 @@ export class ConfidentialComputingClient { * Optional. A TDX with CCEL and RTMR Attestation Quote. * @param {google.cloud.confidentialcomputing.v1.SevSnpAttestation} [request.sevSnpAttestation] * Optional. An SEV-SNP Attestation Report. + * @param {google.cloud.confidentialcomputing.v1.NvidiaAttestation} [request.nvidiaAttestation] + * Optional. An Nvidia attestation report for GPU and NVSwitch devices. * @param {string} request.challenge * Required. The name of the Challenge whose nonce was used to generate the * attestation, in the format `projects/* /locations/* /challenges/*`. The @@ -576,6 +578,9 @@ export class ConfidentialComputingClient { * this information in the attestation. * @param {google.cloud.confidentialcomputing.v1.VerifyConfidentialSpaceRequest.ConfidentialSpaceOptions} [request.options] * Optional. A collection of fields that modify the token output. + * @param {google.cloud.confidentialcomputing.v1.NvidiaAttestation} [request.nvidiaAttestation] + * Optional. An optional Nvidia attestation report, used to populate hardware + * rooted claims for Nvidia devices. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -676,6 +681,8 @@ export class ConfidentialComputingClient { * Required. The name of the Challenge whose nonce was used to generate the * attestation, in the format projects/* /locations/* /challenges/*. The * provided Challenge will be consumed, and cannot be used again. + * @param {google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions} [request.options] + * Optional. A collection of fields that modify the token output. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array.