diff --git a/.jsdoc.js b/.jsdoc.js index 0093b3142..c7aff0474 100644 --- a/.jsdoc.js +++ b/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -40,7 +40,7 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2024 Google LLC', + copyright: 'Copyright 2025 Google LLC', includeDate: false, sourceFiles: false, systemName: '@google-cloud/pubsub', diff --git a/protos/google/pubsub/v1/pubsub.proto b/protos/google/pubsub/v1/pubsub.proto index 0f269f525..6ed87cbba 100644 --- a/protos/google/pubsub/v1/pubsub.proto +++ b/protos/google/pubsub/v1/pubsub.proto @@ -323,6 +323,164 @@ message IngestionDataSourceSettings { string match_glob = 9 [(google.api.field_behavior) = OPTIONAL]; } + // Ingestion settings for Azure Event Hubs. + message AzureEventHubs { + // Possible states for managed ingestion from Event Hubs. + enum State { + // Default value. This value is unused. + STATE_UNSPECIFIED = 0; + + // Ingestion is active. + ACTIVE = 1; + + // Permission denied encountered while consuming data from Event Hubs. + // This can happen when `client_id`, or `tenant_id` are invalid. Or the + // right permissions haven't been granted. + EVENT_HUBS_PERMISSION_DENIED = 2; + + // Permission denied encountered while publishing to the topic. + PUBLISH_PERMISSION_DENIED = 3; + + // The provided Event Hubs namespace couldn't be found. + NAMESPACE_NOT_FOUND = 4; + + // The provided Event Hub couldn't be found. + EVENT_HUB_NOT_FOUND = 5; + + // The provided Event Hubs subscription couldn't be found. + SUBSCRIPTION_NOT_FOUND = 6; + + // The provided Event Hubs resource group couldn't be found. + RESOURCE_GROUP_NOT_FOUND = 7; + } + + // Output only. An output-only field that indicates the state of the Event + // Hubs ingestion source. + State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Name of the resource group within the azure subscription. + string resource_group = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the Event Hubs namespace. + string namespace = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the Event Hub. + string event_hub = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The client id of the Azure application that is being used to + // authenticate Pub/Sub. + string client_id = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The tenant id of the Azure application that is being used to + // authenticate Pub/Sub. + string tenant_id = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Azure subscription id. + string subscription_id = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The GCP service account to be used for Federated Identity + // authentication. + string gcp_service_account = 8 [(google.api.field_behavior) = OPTIONAL]; + } + + // Ingestion settings for Amazon MSK. + message AwsMsk { + // Possible states for managed ingestion from Amazon MSK. + enum State { + // Default value. This value is unused. + STATE_UNSPECIFIED = 0; + + // Ingestion is active. + ACTIVE = 1; + + // Permission denied encountered while consuming data from Amazon MSK. + MSK_PERMISSION_DENIED = 2; + + // Permission denied encountered while publishing to the topic. + PUBLISH_PERMISSION_DENIED = 3; + + // The provided MSK cluster wasn't found. + CLUSTER_NOT_FOUND = 4; + + // The provided topic wasn't found. + TOPIC_NOT_FOUND = 5; + } + + // Output only. An output-only field that indicates the state of the Amazon + // MSK ingestion source. + State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The Amazon Resource Name (ARN) that uniquely identifies the + // cluster. + string cluster_arn = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The name of the topic in the Amazon MSK cluster that Pub/Sub + // will import from. + string topic = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. AWS role ARN to be used for Federated Identity authentication + // with Amazon MSK. Check the Pub/Sub docs for how to set up this role and + // the required permissions that need to be attached to it. + string aws_role_arn = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. The GCP service account to be used for Federated Identity + // authentication with Amazon MSK (via a `AssumeRoleWithWebIdentity` call + // for the provided role). The `aws_role_arn` must be set up with + // `accounts.google.com:sub` equals to this service account number. + string gcp_service_account = 5 [(google.api.field_behavior) = REQUIRED]; + } + + // Ingestion settings for Confluent Cloud. + message ConfluentCloud { + // Possible states for managed ingestion from Confluent Cloud. + enum State { + // Default value. This value is unused. + STATE_UNSPECIFIED = 0; + + // Ingestion is active. + ACTIVE = 1; + + // Permission denied encountered while consuming data from Confluent + // Cloud. + CONFLUENT_CLOUD_PERMISSION_DENIED = 2; + + // Permission denied encountered while publishing to the topic. + PUBLISH_PERMISSION_DENIED = 3; + + // The provided bootstrap server address is unreachable. + UNREACHABLE_BOOTSTRAP_SERVER = 4; + + // The provided cluster wasn't found. + CLUSTER_NOT_FOUND = 5; + + // The provided topic wasn't found. + TOPIC_NOT_FOUND = 6; + } + + // Output only. An output-only field that indicates the state of the + // Confluent Cloud ingestion source. + State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The address of the bootstrap server. The format is url:port. + string bootstrap_server = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The id of the cluster. + string cluster_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The name of the topic in the Confluent Cloud cluster that + // Pub/Sub will import from. + string topic = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. The id of the identity pool to be used for Federated Identity + // authentication with Confluent Cloud. See + // https://docs.confluent.io/cloud/current/security/authenticate/workload-identities/identity-providers/oauth/identity-pools.html#add-oauth-identity-pools. + string identity_pool_id = 5 [(google.api.field_behavior) = REQUIRED]; + + // Required. The GCP service account to be used for Federated Identity + // authentication with `identity_pool_id`. + string gcp_service_account = 6 [(google.api.field_behavior) = REQUIRED]; + } + // Only one source type can have settings set. oneof source { // Optional. Amazon Kinesis Data Streams. @@ -330,6 +488,16 @@ message IngestionDataSourceSettings { // Optional. Cloud Storage. CloudStorage cloud_storage = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Azure Event Hubs. + AzureEventHubs azure_event_hubs = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Amazon MSK. + AwsMsk aws_msk = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Confluent Cloud. + ConfluentCloud confluent_cloud = 6 [(google.api.field_behavior) = OPTIONAL]; } // Optional. Platform Logs settings. If unset, no Platform Logs will be @@ -408,6 +576,78 @@ message IngestionFailureEvent { } } + // Failure when ingesting from an Amazon MSK source. + message AwsMskFailureReason { + // Optional. The ARN of the cluster of the topic being ingested from. + string cluster_arn = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the Kafka topic being ingested from. + string kafka_topic = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The partition ID of the message that failed to be ingested. + int64 partition_id = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The offset within the partition of the message that failed to + // be ingested. + int64 offset = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Reason why ingestion failed for the specified message. + oneof reason { + // Optional. The Pub/Sub API limits prevented the desired message from + // being published. + ApiViolationReason api_violation_reason = 5 + [(google.api.field_behavior) = OPTIONAL]; + } + } + + // Failure when ingesting from an Azure Event Hubs source. + message AzureEventHubsFailureReason { + // Optional. The namespace containing the event hub being ingested from. + string namespace = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the event hub being ingested from. + string event_hub = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The partition ID of the message that failed to be ingested. + int64 partition_id = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The offset within the partition of the message that failed to + // be ingested. + int64 offset = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Reason why ingestion failed for the specified message. + oneof reason { + // Optional. The Pub/Sub API limits prevented the desired message from + // being published. + ApiViolationReason api_violation_reason = 5 + [(google.api.field_behavior) = OPTIONAL]; + } + } + + // Failure when ingesting from a Confluent Cloud source. + message ConfluentCloudFailureReason { + // Optional. The cluster ID containing the topic being ingested from. + string cluster_id = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the Kafka topic being ingested from. + string kafka_topic = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The partition ID of the message that failed to be ingested. + int64 partition_id = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The offset within the partition of the message that failed to + // be ingested. + int64 offset = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Reason why ingestion failed for the specified message. + oneof reason { + // Optional. The Pub/Sub API limits prevented the desired message from + // being published. + ApiViolationReason api_violation_reason = 5 + [(google.api.field_behavior) = OPTIONAL]; + } + } + // Required. Name of the import topic. Format is: // projects/{project_name}/topics/{topic_name}. string topic = 1 [(google.api.field_behavior) = REQUIRED]; @@ -419,6 +659,18 @@ message IngestionFailureEvent { // Optional. Failure when ingesting from Cloud Storage. CloudStorageFailure cloud_storage_failure = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Failure when ingesting from Amazon MSK. + AwsMskFailureReason aws_msk_failure = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Failure when ingesting from Azure Event Hubs. + AzureEventHubsFailureReason azure_event_hubs_failure = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Failure when ingesting from Confluent Cloud. + ConfluentCloudFailureReason confluent_cloud_failure = 6 + [(google.api.field_behavior) = OPTIONAL]; } } diff --git a/protos/protos.d.ts b/protos/protos.d.ts index 1c673e0fe..3ccad3fc0 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -463,6 +463,15 @@ export namespace google { /** IngestionDataSourceSettings cloudStorage */ cloudStorage?: (google.pubsub.v1.IngestionDataSourceSettings.ICloudStorage|null); + /** IngestionDataSourceSettings azureEventHubs */ + azureEventHubs?: (google.pubsub.v1.IngestionDataSourceSettings.IAzureEventHubs|null); + + /** IngestionDataSourceSettings awsMsk */ + awsMsk?: (google.pubsub.v1.IngestionDataSourceSettings.IAwsMsk|null); + + /** IngestionDataSourceSettings confluentCloud */ + confluentCloud?: (google.pubsub.v1.IngestionDataSourceSettings.IConfluentCloud|null); + /** IngestionDataSourceSettings platformLogsSettings */ platformLogsSettings?: (google.pubsub.v1.IPlatformLogsSettings|null); } @@ -482,11 +491,20 @@ export namespace google { /** IngestionDataSourceSettings cloudStorage. */ public cloudStorage?: (google.pubsub.v1.IngestionDataSourceSettings.ICloudStorage|null); + /** IngestionDataSourceSettings azureEventHubs. */ + public azureEventHubs?: (google.pubsub.v1.IngestionDataSourceSettings.IAzureEventHubs|null); + + /** IngestionDataSourceSettings awsMsk. */ + public awsMsk?: (google.pubsub.v1.IngestionDataSourceSettings.IAwsMsk|null); + + /** IngestionDataSourceSettings confluentCloud. */ + public confluentCloud?: (google.pubsub.v1.IngestionDataSourceSettings.IConfluentCloud|null); + /** IngestionDataSourceSettings platformLogsSettings. */ public platformLogsSettings?: (google.pubsub.v1.IPlatformLogsSettings|null); /** IngestionDataSourceSettings source. */ - public source?: ("awsKinesis"|"cloudStorage"); + public source?: ("awsKinesis"|"cloudStorage"|"azureEventHubs"|"awsMsk"|"confluentCloud"); /** * Creates a new IngestionDataSourceSettings instance using the specified properties. @@ -1129,6 +1147,435 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } } + + /** Properties of an AzureEventHubs. */ + interface IAzureEventHubs { + + /** AzureEventHubs state */ + state?: (google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State|keyof typeof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State|null); + + /** AzureEventHubs resourceGroup */ + resourceGroup?: (string|null); + + /** AzureEventHubs namespace */ + namespace?: (string|null); + + /** AzureEventHubs eventHub */ + eventHub?: (string|null); + + /** AzureEventHubs clientId */ + clientId?: (string|null); + + /** AzureEventHubs tenantId */ + tenantId?: (string|null); + + /** AzureEventHubs subscriptionId */ + subscriptionId?: (string|null); + + /** AzureEventHubs gcpServiceAccount */ + gcpServiceAccount?: (string|null); + } + + /** Represents an AzureEventHubs. */ + class AzureEventHubs implements IAzureEventHubs { + + /** + * Constructs a new AzureEventHubs. + * @param [properties] Properties to set + */ + constructor(properties?: google.pubsub.v1.IngestionDataSourceSettings.IAzureEventHubs); + + /** AzureEventHubs state. */ + public state: (google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State|keyof typeof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State); + + /** AzureEventHubs resourceGroup. */ + public resourceGroup: string; + + /** AzureEventHubs namespace. */ + public namespace: string; + + /** AzureEventHubs eventHub. */ + public eventHub: string; + + /** AzureEventHubs clientId. */ + public clientId: string; + + /** AzureEventHubs tenantId. */ + public tenantId: string; + + /** AzureEventHubs subscriptionId. */ + public subscriptionId: string; + + /** AzureEventHubs gcpServiceAccount. */ + public gcpServiceAccount: string; + + /** + * Creates a new AzureEventHubs instance using the specified properties. + * @param [properties] Properties to set + * @returns AzureEventHubs instance + */ + public static create(properties?: google.pubsub.v1.IngestionDataSourceSettings.IAzureEventHubs): google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs; + + /** + * Encodes the specified AzureEventHubs message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.verify|verify} messages. + * @param message AzureEventHubs message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.pubsub.v1.IngestionDataSourceSettings.IAzureEventHubs, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AzureEventHubs message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.verify|verify} messages. + * @param message AzureEventHubs message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.pubsub.v1.IngestionDataSourceSettings.IAzureEventHubs, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AzureEventHubs message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AzureEventHubs + * @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.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs; + + /** + * Decodes an AzureEventHubs message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AzureEventHubs + * @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.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs; + + /** + * Verifies an AzureEventHubs 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 an AzureEventHubs message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AzureEventHubs + */ + public static fromObject(object: { [k: string]: any }): google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs; + + /** + * Creates a plain object from an AzureEventHubs message. Also converts values to other types if specified. + * @param message AzureEventHubs + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AzureEventHubs to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AzureEventHubs + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AzureEventHubs { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + ACTIVE = 1, + EVENT_HUBS_PERMISSION_DENIED = 2, + PUBLISH_PERMISSION_DENIED = 3, + NAMESPACE_NOT_FOUND = 4, + EVENT_HUB_NOT_FOUND = 5, + SUBSCRIPTION_NOT_FOUND = 6, + RESOURCE_GROUP_NOT_FOUND = 7 + } + } + + /** Properties of an AwsMsk. */ + interface IAwsMsk { + + /** AwsMsk state */ + state?: (google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State|keyof typeof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State|null); + + /** AwsMsk clusterArn */ + clusterArn?: (string|null); + + /** AwsMsk topic */ + topic?: (string|null); + + /** AwsMsk awsRoleArn */ + awsRoleArn?: (string|null); + + /** AwsMsk gcpServiceAccount */ + gcpServiceAccount?: (string|null); + } + + /** Represents an AwsMsk. */ + class AwsMsk implements IAwsMsk { + + /** + * Constructs a new AwsMsk. + * @param [properties] Properties to set + */ + constructor(properties?: google.pubsub.v1.IngestionDataSourceSettings.IAwsMsk); + + /** AwsMsk state. */ + public state: (google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State|keyof typeof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State); + + /** AwsMsk clusterArn. */ + public clusterArn: string; + + /** AwsMsk topic. */ + public topic: string; + + /** AwsMsk awsRoleArn. */ + public awsRoleArn: string; + + /** AwsMsk gcpServiceAccount. */ + public gcpServiceAccount: string; + + /** + * Creates a new AwsMsk instance using the specified properties. + * @param [properties] Properties to set + * @returns AwsMsk instance + */ + public static create(properties?: google.pubsub.v1.IngestionDataSourceSettings.IAwsMsk): google.pubsub.v1.IngestionDataSourceSettings.AwsMsk; + + /** + * Encodes the specified AwsMsk message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.verify|verify} messages. + * @param message AwsMsk message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.pubsub.v1.IngestionDataSourceSettings.IAwsMsk, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AwsMsk message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.verify|verify} messages. + * @param message AwsMsk message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.pubsub.v1.IngestionDataSourceSettings.IAwsMsk, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AwsMsk message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AwsMsk + * @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.pubsub.v1.IngestionDataSourceSettings.AwsMsk; + + /** + * Decodes an AwsMsk message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AwsMsk + * @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.pubsub.v1.IngestionDataSourceSettings.AwsMsk; + + /** + * Verifies an AwsMsk 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 an AwsMsk message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AwsMsk + */ + public static fromObject(object: { [k: string]: any }): google.pubsub.v1.IngestionDataSourceSettings.AwsMsk; + + /** + * Creates a plain object from an AwsMsk message. Also converts values to other types if specified. + * @param message AwsMsk + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.pubsub.v1.IngestionDataSourceSettings.AwsMsk, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AwsMsk to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AwsMsk + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AwsMsk { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + ACTIVE = 1, + MSK_PERMISSION_DENIED = 2, + PUBLISH_PERMISSION_DENIED = 3, + CLUSTER_NOT_FOUND = 4, + TOPIC_NOT_FOUND = 5 + } + } + + /** Properties of a ConfluentCloud. */ + interface IConfluentCloud { + + /** ConfluentCloud state */ + state?: (google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State|keyof typeof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State|null); + + /** ConfluentCloud bootstrapServer */ + bootstrapServer?: (string|null); + + /** ConfluentCloud clusterId */ + clusterId?: (string|null); + + /** ConfluentCloud topic */ + topic?: (string|null); + + /** ConfluentCloud identityPoolId */ + identityPoolId?: (string|null); + + /** ConfluentCloud gcpServiceAccount */ + gcpServiceAccount?: (string|null); + } + + /** Represents a ConfluentCloud. */ + class ConfluentCloud implements IConfluentCloud { + + /** + * Constructs a new ConfluentCloud. + * @param [properties] Properties to set + */ + constructor(properties?: google.pubsub.v1.IngestionDataSourceSettings.IConfluentCloud); + + /** ConfluentCloud state. */ + public state: (google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State|keyof typeof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State); + + /** ConfluentCloud bootstrapServer. */ + public bootstrapServer: string; + + /** ConfluentCloud clusterId. */ + public clusterId: string; + + /** ConfluentCloud topic. */ + public topic: string; + + /** ConfluentCloud identityPoolId. */ + public identityPoolId: string; + + /** ConfluentCloud gcpServiceAccount. */ + public gcpServiceAccount: string; + + /** + * Creates a new ConfluentCloud instance using the specified properties. + * @param [properties] Properties to set + * @returns ConfluentCloud instance + */ + public static create(properties?: google.pubsub.v1.IngestionDataSourceSettings.IConfluentCloud): google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud; + + /** + * Encodes the specified ConfluentCloud message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.verify|verify} messages. + * @param message ConfluentCloud message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.pubsub.v1.IngestionDataSourceSettings.IConfluentCloud, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConfluentCloud message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.verify|verify} messages. + * @param message ConfluentCloud message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.pubsub.v1.IngestionDataSourceSettings.IConfluentCloud, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConfluentCloud message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConfluentCloud + * @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.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud; + + /** + * Decodes a ConfluentCloud message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConfluentCloud + * @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.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud; + + /** + * Verifies a ConfluentCloud 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 ConfluentCloud message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConfluentCloud + */ + public static fromObject(object: { [k: string]: any }): google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud; + + /** + * Creates a plain object from a ConfluentCloud message. Also converts values to other types if specified. + * @param message ConfluentCloud + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConfluentCloud to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConfluentCloud + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ConfluentCloud { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + ACTIVE = 1, + CONFLUENT_CLOUD_PERMISSION_DENIED = 2, + PUBLISH_PERMISSION_DENIED = 3, + UNREACHABLE_BOOTSTRAP_SERVER = 4, + CLUSTER_NOT_FOUND = 5, + TOPIC_NOT_FOUND = 6 + } + } } /** Properties of a PlatformLogsSettings. */ @@ -1252,6 +1699,15 @@ export namespace google { /** IngestionFailureEvent cloudStorageFailure */ cloudStorageFailure?: (google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure|null); + + /** IngestionFailureEvent awsMskFailure */ + awsMskFailure?: (google.pubsub.v1.IngestionFailureEvent.IAwsMskFailureReason|null); + + /** IngestionFailureEvent azureEventHubsFailure */ + azureEventHubsFailure?: (google.pubsub.v1.IngestionFailureEvent.IAzureEventHubsFailureReason|null); + + /** IngestionFailureEvent confluentCloudFailure */ + confluentCloudFailure?: (google.pubsub.v1.IngestionFailureEvent.IConfluentCloudFailureReason|null); } /** Represents an IngestionFailureEvent. */ @@ -1272,8 +1728,17 @@ export namespace google { /** IngestionFailureEvent cloudStorageFailure. */ public cloudStorageFailure?: (google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure|null); + /** IngestionFailureEvent awsMskFailure. */ + public awsMskFailure?: (google.pubsub.v1.IngestionFailureEvent.IAwsMskFailureReason|null); + + /** IngestionFailureEvent azureEventHubsFailure. */ + public azureEventHubsFailure?: (google.pubsub.v1.IngestionFailureEvent.IAzureEventHubsFailureReason|null); + + /** IngestionFailureEvent confluentCloudFailure. */ + public confluentCloudFailure?: (google.pubsub.v1.IngestionFailureEvent.IConfluentCloudFailureReason|null); + /** IngestionFailureEvent failure. */ - public failure?: "cloudStorageFailure"; + public failure?: ("cloudStorageFailure"|"awsMskFailure"|"azureEventHubsFailure"|"confluentCloudFailure"); /** * Creates a new IngestionFailureEvent instance using the specified properties. @@ -1660,6 +2125,378 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of an AwsMskFailureReason. */ + interface IAwsMskFailureReason { + + /** AwsMskFailureReason clusterArn */ + clusterArn?: (string|null); + + /** AwsMskFailureReason kafkaTopic */ + kafkaTopic?: (string|null); + + /** AwsMskFailureReason partitionId */ + partitionId?: (number|Long|string|null); + + /** AwsMskFailureReason offset */ + offset?: (number|Long|string|null); + + /** AwsMskFailureReason apiViolationReason */ + apiViolationReason?: (google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null); + } + + /** Represents an AwsMskFailureReason. */ + class AwsMskFailureReason implements IAwsMskFailureReason { + + /** + * Constructs a new AwsMskFailureReason. + * @param [properties] Properties to set + */ + constructor(properties?: google.pubsub.v1.IngestionFailureEvent.IAwsMskFailureReason); + + /** AwsMskFailureReason clusterArn. */ + public clusterArn: string; + + /** AwsMskFailureReason kafkaTopic. */ + public kafkaTopic: string; + + /** AwsMskFailureReason partitionId. */ + public partitionId: (number|Long|string); + + /** AwsMskFailureReason offset. */ + public offset: (number|Long|string); + + /** AwsMskFailureReason apiViolationReason. */ + public apiViolationReason?: (google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null); + + /** AwsMskFailureReason reason. */ + public reason?: "apiViolationReason"; + + /** + * Creates a new AwsMskFailureReason instance using the specified properties. + * @param [properties] Properties to set + * @returns AwsMskFailureReason instance + */ + public static create(properties?: google.pubsub.v1.IngestionFailureEvent.IAwsMskFailureReason): google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason; + + /** + * Encodes the specified AwsMskFailureReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.verify|verify} messages. + * @param message AwsMskFailureReason message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.pubsub.v1.IngestionFailureEvent.IAwsMskFailureReason, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AwsMskFailureReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.verify|verify} messages. + * @param message AwsMskFailureReason message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.pubsub.v1.IngestionFailureEvent.IAwsMskFailureReason, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AwsMskFailureReason message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AwsMskFailureReason + * @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.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason; + + /** + * Decodes an AwsMskFailureReason message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AwsMskFailureReason + * @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.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason; + + /** + * Verifies an AwsMskFailureReason 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 an AwsMskFailureReason message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AwsMskFailureReason + */ + public static fromObject(object: { [k: string]: any }): google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason; + + /** + * Creates a plain object from an AwsMskFailureReason message. Also converts values to other types if specified. + * @param message AwsMskFailureReason + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AwsMskFailureReason to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AwsMskFailureReason + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AzureEventHubsFailureReason. */ + interface IAzureEventHubsFailureReason { + + /** AzureEventHubsFailureReason namespace */ + namespace?: (string|null); + + /** AzureEventHubsFailureReason eventHub */ + eventHub?: (string|null); + + /** AzureEventHubsFailureReason partitionId */ + partitionId?: (number|Long|string|null); + + /** AzureEventHubsFailureReason offset */ + offset?: (number|Long|string|null); + + /** AzureEventHubsFailureReason apiViolationReason */ + apiViolationReason?: (google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null); + } + + /** Represents an AzureEventHubsFailureReason. */ + class AzureEventHubsFailureReason implements IAzureEventHubsFailureReason { + + /** + * Constructs a new AzureEventHubsFailureReason. + * @param [properties] Properties to set + */ + constructor(properties?: google.pubsub.v1.IngestionFailureEvent.IAzureEventHubsFailureReason); + + /** AzureEventHubsFailureReason namespace. */ + public namespace: string; + + /** AzureEventHubsFailureReason eventHub. */ + public eventHub: string; + + /** AzureEventHubsFailureReason partitionId. */ + public partitionId: (number|Long|string); + + /** AzureEventHubsFailureReason offset. */ + public offset: (number|Long|string); + + /** AzureEventHubsFailureReason apiViolationReason. */ + public apiViolationReason?: (google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null); + + /** AzureEventHubsFailureReason reason. */ + public reason?: "apiViolationReason"; + + /** + * Creates a new AzureEventHubsFailureReason instance using the specified properties. + * @param [properties] Properties to set + * @returns AzureEventHubsFailureReason instance + */ + public static create(properties?: google.pubsub.v1.IngestionFailureEvent.IAzureEventHubsFailureReason): google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason; + + /** + * Encodes the specified AzureEventHubsFailureReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.verify|verify} messages. + * @param message AzureEventHubsFailureReason message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.pubsub.v1.IngestionFailureEvent.IAzureEventHubsFailureReason, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AzureEventHubsFailureReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.verify|verify} messages. + * @param message AzureEventHubsFailureReason message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.pubsub.v1.IngestionFailureEvent.IAzureEventHubsFailureReason, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AzureEventHubsFailureReason message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AzureEventHubsFailureReason + * @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.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason; + + /** + * Decodes an AzureEventHubsFailureReason message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AzureEventHubsFailureReason + * @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.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason; + + /** + * Verifies an AzureEventHubsFailureReason 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 an AzureEventHubsFailureReason message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AzureEventHubsFailureReason + */ + public static fromObject(object: { [k: string]: any }): google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason; + + /** + * Creates a plain object from an AzureEventHubsFailureReason message. Also converts values to other types if specified. + * @param message AzureEventHubsFailureReason + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AzureEventHubsFailureReason to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AzureEventHubsFailureReason + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConfluentCloudFailureReason. */ + interface IConfluentCloudFailureReason { + + /** ConfluentCloudFailureReason clusterId */ + clusterId?: (string|null); + + /** ConfluentCloudFailureReason kafkaTopic */ + kafkaTopic?: (string|null); + + /** ConfluentCloudFailureReason partitionId */ + partitionId?: (number|Long|string|null); + + /** ConfluentCloudFailureReason offset */ + offset?: (number|Long|string|null); + + /** ConfluentCloudFailureReason apiViolationReason */ + apiViolationReason?: (google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null); + } + + /** Represents a ConfluentCloudFailureReason. */ + class ConfluentCloudFailureReason implements IConfluentCloudFailureReason { + + /** + * Constructs a new ConfluentCloudFailureReason. + * @param [properties] Properties to set + */ + constructor(properties?: google.pubsub.v1.IngestionFailureEvent.IConfluentCloudFailureReason); + + /** ConfluentCloudFailureReason clusterId. */ + public clusterId: string; + + /** ConfluentCloudFailureReason kafkaTopic. */ + public kafkaTopic: string; + + /** ConfluentCloudFailureReason partitionId. */ + public partitionId: (number|Long|string); + + /** ConfluentCloudFailureReason offset. */ + public offset: (number|Long|string); + + /** ConfluentCloudFailureReason apiViolationReason. */ + public apiViolationReason?: (google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null); + + /** ConfluentCloudFailureReason reason. */ + public reason?: "apiViolationReason"; + + /** + * Creates a new ConfluentCloudFailureReason instance using the specified properties. + * @param [properties] Properties to set + * @returns ConfluentCloudFailureReason instance + */ + public static create(properties?: google.pubsub.v1.IngestionFailureEvent.IConfluentCloudFailureReason): google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason; + + /** + * Encodes the specified ConfluentCloudFailureReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.verify|verify} messages. + * @param message ConfluentCloudFailureReason message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.pubsub.v1.IngestionFailureEvent.IConfluentCloudFailureReason, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConfluentCloudFailureReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.verify|verify} messages. + * @param message ConfluentCloudFailureReason message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.pubsub.v1.IngestionFailureEvent.IConfluentCloudFailureReason, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConfluentCloudFailureReason message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConfluentCloudFailureReason + * @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.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason; + + /** + * Decodes a ConfluentCloudFailureReason message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConfluentCloudFailureReason + * @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.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason; + + /** + * Verifies a ConfluentCloudFailureReason 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 ConfluentCloudFailureReason message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConfluentCloudFailureReason + */ + public static fromObject(object: { [k: string]: any }): google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason; + + /** + * Creates a plain object from a ConfluentCloudFailureReason message. Also converts values to other types if specified. + * @param message ConfluentCloudFailureReason + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConfluentCloudFailureReason to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConfluentCloudFailureReason + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Properties of a Topic. */ diff --git a/protos/protos.js b/protos/protos.js index 590cfac5b..bc3604fdb 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -937,6 +937,9 @@ * @interface IIngestionDataSourceSettings * @property {google.pubsub.v1.IngestionDataSourceSettings.IAwsKinesis|null} [awsKinesis] IngestionDataSourceSettings awsKinesis * @property {google.pubsub.v1.IngestionDataSourceSettings.ICloudStorage|null} [cloudStorage] IngestionDataSourceSettings cloudStorage + * @property {google.pubsub.v1.IngestionDataSourceSettings.IAzureEventHubs|null} [azureEventHubs] IngestionDataSourceSettings azureEventHubs + * @property {google.pubsub.v1.IngestionDataSourceSettings.IAwsMsk|null} [awsMsk] IngestionDataSourceSettings awsMsk + * @property {google.pubsub.v1.IngestionDataSourceSettings.IConfluentCloud|null} [confluentCloud] IngestionDataSourceSettings confluentCloud * @property {google.pubsub.v1.IPlatformLogsSettings|null} [platformLogsSettings] IngestionDataSourceSettings platformLogsSettings */ @@ -971,6 +974,30 @@ */ IngestionDataSourceSettings.prototype.cloudStorage = null; + /** + * IngestionDataSourceSettings azureEventHubs. + * @member {google.pubsub.v1.IngestionDataSourceSettings.IAzureEventHubs|null|undefined} azureEventHubs + * @memberof google.pubsub.v1.IngestionDataSourceSettings + * @instance + */ + IngestionDataSourceSettings.prototype.azureEventHubs = null; + + /** + * IngestionDataSourceSettings awsMsk. + * @member {google.pubsub.v1.IngestionDataSourceSettings.IAwsMsk|null|undefined} awsMsk + * @memberof google.pubsub.v1.IngestionDataSourceSettings + * @instance + */ + IngestionDataSourceSettings.prototype.awsMsk = null; + + /** + * IngestionDataSourceSettings confluentCloud. + * @member {google.pubsub.v1.IngestionDataSourceSettings.IConfluentCloud|null|undefined} confluentCloud + * @memberof google.pubsub.v1.IngestionDataSourceSettings + * @instance + */ + IngestionDataSourceSettings.prototype.confluentCloud = null; + /** * IngestionDataSourceSettings platformLogsSettings. * @member {google.pubsub.v1.IPlatformLogsSettings|null|undefined} platformLogsSettings @@ -984,12 +1011,12 @@ /** * IngestionDataSourceSettings source. - * @member {"awsKinesis"|"cloudStorage"|undefined} source + * @member {"awsKinesis"|"cloudStorage"|"azureEventHubs"|"awsMsk"|"confluentCloud"|undefined} source * @memberof google.pubsub.v1.IngestionDataSourceSettings * @instance */ Object.defineProperty(IngestionDataSourceSettings.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["awsKinesis", "cloudStorage"]), + get: $util.oneOfGetter($oneOfFields = ["awsKinesis", "cloudStorage", "azureEventHubs", "awsMsk", "confluentCloud"]), set: $util.oneOfSetter($oneOfFields) }); @@ -1021,8 +1048,14 @@ $root.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.encode(message.awsKinesis, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.cloudStorage != null && Object.hasOwnProperty.call(message, "cloudStorage")) $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.encode(message.cloudStorage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.azureEventHubs != null && Object.hasOwnProperty.call(message, "azureEventHubs")) + $root.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.encode(message.azureEventHubs, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.platformLogsSettings != null && Object.hasOwnProperty.call(message, "platformLogsSettings")) $root.google.pubsub.v1.PlatformLogsSettings.encode(message.platformLogsSettings, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.awsMsk != null && Object.hasOwnProperty.call(message, "awsMsk")) + $root.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.encode(message.awsMsk, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.confluentCloud != null && Object.hasOwnProperty.call(message, "confluentCloud")) + $root.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.encode(message.confluentCloud, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -1065,6 +1098,18 @@ message.cloudStorage = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.decode(reader, reader.uint32()); break; } + case 3: { + message.azureEventHubs = $root.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.decode(reader, reader.uint32()); + break; + } + case 5: { + message.awsMsk = $root.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.decode(reader, reader.uint32()); + break; + } + case 6: { + message.confluentCloud = $root.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.decode(reader, reader.uint32()); + break; + } case 4: { message.platformLogsSettings = $root.google.pubsub.v1.PlatformLogsSettings.decode(reader, reader.uint32()); break; @@ -1123,6 +1168,36 @@ return "cloudStorage." + error; } } + if (message.azureEventHubs != null && message.hasOwnProperty("azureEventHubs")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.verify(message.azureEventHubs); + if (error) + return "azureEventHubs." + error; + } + } + if (message.awsMsk != null && message.hasOwnProperty("awsMsk")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.verify(message.awsMsk); + if (error) + return "awsMsk." + error; + } + } + if (message.confluentCloud != null && message.hasOwnProperty("confluentCloud")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.verify(message.confluentCloud); + if (error) + return "confluentCloud." + error; + } + } if (message.platformLogsSettings != null && message.hasOwnProperty("platformLogsSettings")) { var error = $root.google.pubsub.v1.PlatformLogsSettings.verify(message.platformLogsSettings); if (error) @@ -1153,6 +1228,21 @@ throw TypeError(".google.pubsub.v1.IngestionDataSourceSettings.cloudStorage: object expected"); message.cloudStorage = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.fromObject(object.cloudStorage); } + if (object.azureEventHubs != null) { + if (typeof object.azureEventHubs !== "object") + throw TypeError(".google.pubsub.v1.IngestionDataSourceSettings.azureEventHubs: object expected"); + message.azureEventHubs = $root.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.fromObject(object.azureEventHubs); + } + if (object.awsMsk != null) { + if (typeof object.awsMsk !== "object") + throw TypeError(".google.pubsub.v1.IngestionDataSourceSettings.awsMsk: object expected"); + message.awsMsk = $root.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.fromObject(object.awsMsk); + } + if (object.confluentCloud != null) { + if (typeof object.confluentCloud !== "object") + throw TypeError(".google.pubsub.v1.IngestionDataSourceSettings.confluentCloud: object expected"); + message.confluentCloud = $root.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.fromObject(object.confluentCloud); + } if (object.platformLogsSettings != null) { if (typeof object.platformLogsSettings !== "object") throw TypeError(".google.pubsub.v1.IngestionDataSourceSettings.platformLogsSettings: object expected"); @@ -1186,8 +1276,23 @@ if (options.oneofs) object.source = "cloudStorage"; } + if (message.azureEventHubs != null && message.hasOwnProperty("azureEventHubs")) { + object.azureEventHubs = $root.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.toObject(message.azureEventHubs, options); + if (options.oneofs) + object.source = "azureEventHubs"; + } if (message.platformLogsSettings != null && message.hasOwnProperty("platformLogsSettings")) object.platformLogsSettings = $root.google.pubsub.v1.PlatformLogsSettings.toObject(message.platformLogsSettings, options); + if (message.awsMsk != null && message.hasOwnProperty("awsMsk")) { + object.awsMsk = $root.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.toObject(message.awsMsk, options); + if (options.oneofs) + object.source = "awsMsk"; + } + if (message.confluentCloud != null && message.hasOwnProperty("confluentCloud")) { + object.confluentCloud = $root.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.toObject(message.confluentCloud, options); + if (options.oneofs) + object.source = "confluentCloud"; + } return object; }; @@ -2597,182 +2702,1366 @@ return CloudStorage; })(); - return IngestionDataSourceSettings; - })(); + IngestionDataSourceSettings.AzureEventHubs = (function() { - v1.PlatformLogsSettings = (function() { + /** + * Properties of an AzureEventHubs. + * @memberof google.pubsub.v1.IngestionDataSourceSettings + * @interface IAzureEventHubs + * @property {google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State|null} [state] AzureEventHubs state + * @property {string|null} [resourceGroup] AzureEventHubs resourceGroup + * @property {string|null} [namespace] AzureEventHubs namespace + * @property {string|null} [eventHub] AzureEventHubs eventHub + * @property {string|null} [clientId] AzureEventHubs clientId + * @property {string|null} [tenantId] AzureEventHubs tenantId + * @property {string|null} [subscriptionId] AzureEventHubs subscriptionId + * @property {string|null} [gcpServiceAccount] AzureEventHubs gcpServiceAccount + */ - /** - * Properties of a PlatformLogsSettings. - * @memberof google.pubsub.v1 - * @interface IPlatformLogsSettings - * @property {google.pubsub.v1.PlatformLogsSettings.Severity|null} [severity] PlatformLogsSettings severity - */ + /** + * Constructs a new AzureEventHubs. + * @memberof google.pubsub.v1.IngestionDataSourceSettings + * @classdesc Represents an AzureEventHubs. + * @implements IAzureEventHubs + * @constructor + * @param {google.pubsub.v1.IngestionDataSourceSettings.IAzureEventHubs=} [properties] Properties to set + */ + function AzureEventHubs(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]]; + } - /** - * Constructs a new PlatformLogsSettings. - * @memberof google.pubsub.v1 - * @classdesc Represents a PlatformLogsSettings. - * @implements IPlatformLogsSettings - * @constructor - * @param {google.pubsub.v1.IPlatformLogsSettings=} [properties] Properties to set - */ - function PlatformLogsSettings(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]]; - } + /** + * AzureEventHubs state. + * @member {google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State} state + * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs + * @instance + */ + AzureEventHubs.prototype.state = 0; - /** - * PlatformLogsSettings severity. - * @member {google.pubsub.v1.PlatformLogsSettings.Severity} severity - * @memberof google.pubsub.v1.PlatformLogsSettings - * @instance - */ - PlatformLogsSettings.prototype.severity = 0; + /** + * AzureEventHubs resourceGroup. + * @member {string} resourceGroup + * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs + * @instance + */ + AzureEventHubs.prototype.resourceGroup = ""; - /** - * Creates a new PlatformLogsSettings instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.PlatformLogsSettings - * @static - * @param {google.pubsub.v1.IPlatformLogsSettings=} [properties] Properties to set - * @returns {google.pubsub.v1.PlatformLogsSettings} PlatformLogsSettings instance - */ - PlatformLogsSettings.create = function create(properties) { - return new PlatformLogsSettings(properties); - }; + /** + * AzureEventHubs namespace. + * @member {string} namespace + * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs + * @instance + */ + AzureEventHubs.prototype.namespace = ""; - /** - * Encodes the specified PlatformLogsSettings message. Does not implicitly {@link google.pubsub.v1.PlatformLogsSettings.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.PlatformLogsSettings - * @static - * @param {google.pubsub.v1.IPlatformLogsSettings} message PlatformLogsSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PlatformLogsSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.severity); - return writer; - }; + /** + * AzureEventHubs eventHub. + * @member {string} eventHub + * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs + * @instance + */ + AzureEventHubs.prototype.eventHub = ""; - /** - * Encodes the specified PlatformLogsSettings message, length delimited. Does not implicitly {@link google.pubsub.v1.PlatformLogsSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.PlatformLogsSettings - * @static - * @param {google.pubsub.v1.IPlatformLogsSettings} message PlatformLogsSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PlatformLogsSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * AzureEventHubs clientId. + * @member {string} clientId + * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs + * @instance + */ + AzureEventHubs.prototype.clientId = ""; - /** - * Decodes a PlatformLogsSettings message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.PlatformLogsSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.PlatformLogsSettings} PlatformLogsSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PlatformLogsSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.PlatformLogsSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.severity = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * AzureEventHubs tenantId. + * @member {string} tenantId + * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs + * @instance + */ + AzureEventHubs.prototype.tenantId = ""; - /** - * Decodes a PlatformLogsSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.PlatformLogsSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.PlatformLogsSettings} PlatformLogsSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PlatformLogsSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * AzureEventHubs subscriptionId. + * @member {string} subscriptionId + * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs + * @instance + */ + AzureEventHubs.prototype.subscriptionId = ""; - /** - * Verifies a PlatformLogsSettings message. - * @function verify - * @memberof google.pubsub.v1.PlatformLogsSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PlatformLogsSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.severity != null && message.hasOwnProperty("severity")) - switch (message.severity) { - default: - return "severity: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - return null; - }; + /** + * AzureEventHubs gcpServiceAccount. + * @member {string} gcpServiceAccount + * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs + * @instance + */ + AzureEventHubs.prototype.gcpServiceAccount = ""; - /** - * Creates a PlatformLogsSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.PlatformLogsSettings - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.PlatformLogsSettings} PlatformLogsSettings - */ - PlatformLogsSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.pubsub.v1.PlatformLogsSettings) - return object; - var message = new $root.google.pubsub.v1.PlatformLogsSettings(); - switch (object.severity) { - default: - if (typeof object.severity === "number") { - message.severity = object.severity; - break; - } - break; - case "SEVERITY_UNSPECIFIED": - case 0: - message.severity = 0; - break; - case "DISABLED": - case 1: - message.severity = 1; - break; + /** + * Creates a new AzureEventHubs instance using the specified properties. + * @function create + * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs + * @static + * @param {google.pubsub.v1.IngestionDataSourceSettings.IAzureEventHubs=} [properties] Properties to set + * @returns {google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs} AzureEventHubs instance + */ + AzureEventHubs.create = function create(properties) { + return new AzureEventHubs(properties); + }; + + /** + * Encodes the specified AzureEventHubs message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.verify|verify} messages. + * @function encode + * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs + * @static + * @param {google.pubsub.v1.IngestionDataSourceSettings.IAzureEventHubs} message AzureEventHubs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AzureEventHubs.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.resourceGroup != null && Object.hasOwnProperty.call(message, "resourceGroup")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceGroup); + if (message.namespace != null && Object.hasOwnProperty.call(message, "namespace")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.namespace); + if (message.eventHub != null && Object.hasOwnProperty.call(message, "eventHub")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.eventHub); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.clientId); + if (message.tenantId != null && Object.hasOwnProperty.call(message, "tenantId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.tenantId); + if (message.subscriptionId != null && Object.hasOwnProperty.call(message, "subscriptionId")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.subscriptionId); + if (message.gcpServiceAccount != null && Object.hasOwnProperty.call(message, "gcpServiceAccount")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.gcpServiceAccount); + return writer; + }; + + /** + * Encodes the specified AzureEventHubs message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.verify|verify} messages. + * @function encodeDelimited + * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs + * @static + * @param {google.pubsub.v1.IngestionDataSourceSettings.IAzureEventHubs} message AzureEventHubs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AzureEventHubs.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AzureEventHubs message from the specified reader or buffer. + * @function decode + * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs} AzureEventHubs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AzureEventHubs.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.state = reader.int32(); + break; + } + case 2: { + message.resourceGroup = reader.string(); + break; + } + case 3: { + message.namespace = reader.string(); + break; + } + case 4: { + message.eventHub = reader.string(); + break; + } + case 5: { + message.clientId = reader.string(); + break; + } + case 6: { + message.tenantId = reader.string(); + break; + } + case 7: { + message.subscriptionId = reader.string(); + break; + } + case 8: { + message.gcpServiceAccount = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AzureEventHubs message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs} AzureEventHubs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AzureEventHubs.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AzureEventHubs message. + * @function verify + * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AzureEventHubs.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.resourceGroup != null && message.hasOwnProperty("resourceGroup")) + if (!$util.isString(message.resourceGroup)) + return "resourceGroup: string expected"; + if (message.namespace != null && message.hasOwnProperty("namespace")) + if (!$util.isString(message.namespace)) + return "namespace: string expected"; + if (message.eventHub != null && message.hasOwnProperty("eventHub")) + if (!$util.isString(message.eventHub)) + return "eventHub: string expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.tenantId != null && message.hasOwnProperty("tenantId")) + if (!$util.isString(message.tenantId)) + return "tenantId: string expected"; + if (message.subscriptionId != null && message.hasOwnProperty("subscriptionId")) + if (!$util.isString(message.subscriptionId)) + return "subscriptionId: string expected"; + if (message.gcpServiceAccount != null && message.hasOwnProperty("gcpServiceAccount")) + if (!$util.isString(message.gcpServiceAccount)) + return "gcpServiceAccount: string expected"; + return null; + }; + + /** + * Creates an AzureEventHubs message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs + * @static + * @param {Object.} object Plain object + * @returns {google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs} AzureEventHubs + */ + AzureEventHubs.fromObject = function fromObject(object) { + if (object instanceof $root.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs) + return object; + var message = new $root.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs(); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ACTIVE": + case 1: + message.state = 1; + break; + case "EVENT_HUBS_PERMISSION_DENIED": + case 2: + message.state = 2; + break; + case "PUBLISH_PERMISSION_DENIED": + case 3: + message.state = 3; + break; + case "NAMESPACE_NOT_FOUND": + case 4: + message.state = 4; + break; + case "EVENT_HUB_NOT_FOUND": + case 5: + message.state = 5; + break; + case "SUBSCRIPTION_NOT_FOUND": + case 6: + message.state = 6; + break; + case "RESOURCE_GROUP_NOT_FOUND": + case 7: + message.state = 7; + break; + } + if (object.resourceGroup != null) + message.resourceGroup = String(object.resourceGroup); + if (object.namespace != null) + message.namespace = String(object.namespace); + if (object.eventHub != null) + message.eventHub = String(object.eventHub); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.tenantId != null) + message.tenantId = String(object.tenantId); + if (object.subscriptionId != null) + message.subscriptionId = String(object.subscriptionId); + if (object.gcpServiceAccount != null) + message.gcpServiceAccount = String(object.gcpServiceAccount); + return message; + }; + + /** + * Creates a plain object from an AzureEventHubs message. Also converts values to other types if specified. + * @function toObject + * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs + * @static + * @param {google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs} message AzureEventHubs + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AzureEventHubs.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.resourceGroup = ""; + object.namespace = ""; + object.eventHub = ""; + object.clientId = ""; + object.tenantId = ""; + object.subscriptionId = ""; + object.gcpServiceAccount = ""; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State[message.state] === undefined ? message.state : $root.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State[message.state] : message.state; + if (message.resourceGroup != null && message.hasOwnProperty("resourceGroup")) + object.resourceGroup = message.resourceGroup; + if (message.namespace != null && message.hasOwnProperty("namespace")) + object.namespace = message.namespace; + if (message.eventHub != null && message.hasOwnProperty("eventHub")) + object.eventHub = message.eventHub; + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.tenantId != null && message.hasOwnProperty("tenantId")) + object.tenantId = message.tenantId; + if (message.subscriptionId != null && message.hasOwnProperty("subscriptionId")) + object.subscriptionId = message.subscriptionId; + if (message.gcpServiceAccount != null && message.hasOwnProperty("gcpServiceAccount")) + object.gcpServiceAccount = message.gcpServiceAccount; + return object; + }; + + /** + * Converts this AzureEventHubs to JSON. + * @function toJSON + * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs + * @instance + * @returns {Object.} JSON object + */ + AzureEventHubs.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AzureEventHubs + * @function getTypeUrl + * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AzureEventHubs.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs"; + }; + + /** + * State enum. + * @name google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} EVENT_HUBS_PERMISSION_DENIED=2 EVENT_HUBS_PERMISSION_DENIED value + * @property {number} PUBLISH_PERMISSION_DENIED=3 PUBLISH_PERMISSION_DENIED value + * @property {number} NAMESPACE_NOT_FOUND=4 NAMESPACE_NOT_FOUND value + * @property {number} EVENT_HUB_NOT_FOUND=5 EVENT_HUB_NOT_FOUND value + * @property {number} SUBSCRIPTION_NOT_FOUND=6 SUBSCRIPTION_NOT_FOUND value + * @property {number} RESOURCE_GROUP_NOT_FOUND=7 RESOURCE_GROUP_NOT_FOUND value + */ + AzureEventHubs.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "EVENT_HUBS_PERMISSION_DENIED"] = 2; + values[valuesById[3] = "PUBLISH_PERMISSION_DENIED"] = 3; + values[valuesById[4] = "NAMESPACE_NOT_FOUND"] = 4; + values[valuesById[5] = "EVENT_HUB_NOT_FOUND"] = 5; + values[valuesById[6] = "SUBSCRIPTION_NOT_FOUND"] = 6; + values[valuesById[7] = "RESOURCE_GROUP_NOT_FOUND"] = 7; + return values; + })(); + + return AzureEventHubs; + })(); + + IngestionDataSourceSettings.AwsMsk = (function() { + + /** + * Properties of an AwsMsk. + * @memberof google.pubsub.v1.IngestionDataSourceSettings + * @interface IAwsMsk + * @property {google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State|null} [state] AwsMsk state + * @property {string|null} [clusterArn] AwsMsk clusterArn + * @property {string|null} [topic] AwsMsk topic + * @property {string|null} [awsRoleArn] AwsMsk awsRoleArn + * @property {string|null} [gcpServiceAccount] AwsMsk gcpServiceAccount + */ + + /** + * Constructs a new AwsMsk. + * @memberof google.pubsub.v1.IngestionDataSourceSettings + * @classdesc Represents an AwsMsk. + * @implements IAwsMsk + * @constructor + * @param {google.pubsub.v1.IngestionDataSourceSettings.IAwsMsk=} [properties] Properties to set + */ + function AwsMsk(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]]; + } + + /** + * AwsMsk state. + * @member {google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State} state + * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk + * @instance + */ + AwsMsk.prototype.state = 0; + + /** + * AwsMsk clusterArn. + * @member {string} clusterArn + * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk + * @instance + */ + AwsMsk.prototype.clusterArn = ""; + + /** + * AwsMsk topic. + * @member {string} topic + * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk + * @instance + */ + AwsMsk.prototype.topic = ""; + + /** + * AwsMsk awsRoleArn. + * @member {string} awsRoleArn + * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk + * @instance + */ + AwsMsk.prototype.awsRoleArn = ""; + + /** + * AwsMsk gcpServiceAccount. + * @member {string} gcpServiceAccount + * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk + * @instance + */ + AwsMsk.prototype.gcpServiceAccount = ""; + + /** + * Creates a new AwsMsk instance using the specified properties. + * @function create + * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk + * @static + * @param {google.pubsub.v1.IngestionDataSourceSettings.IAwsMsk=} [properties] Properties to set + * @returns {google.pubsub.v1.IngestionDataSourceSettings.AwsMsk} AwsMsk instance + */ + AwsMsk.create = function create(properties) { + return new AwsMsk(properties); + }; + + /** + * Encodes the specified AwsMsk message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.verify|verify} messages. + * @function encode + * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk + * @static + * @param {google.pubsub.v1.IngestionDataSourceSettings.IAwsMsk} message AwsMsk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsMsk.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.clusterArn != null && Object.hasOwnProperty.call(message, "clusterArn")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.clusterArn); + if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.topic); + if (message.awsRoleArn != null && Object.hasOwnProperty.call(message, "awsRoleArn")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.awsRoleArn); + if (message.gcpServiceAccount != null && Object.hasOwnProperty.call(message, "gcpServiceAccount")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.gcpServiceAccount); + return writer; + }; + + /** + * Encodes the specified AwsMsk message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.verify|verify} messages. + * @function encodeDelimited + * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk + * @static + * @param {google.pubsub.v1.IngestionDataSourceSettings.IAwsMsk} message AwsMsk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsMsk.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AwsMsk message from the specified reader or buffer. + * @function decode + * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.pubsub.v1.IngestionDataSourceSettings.AwsMsk} AwsMsk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsMsk.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.state = reader.int32(); + break; + } + case 2: { + message.clusterArn = reader.string(); + break; + } + case 3: { + message.topic = reader.string(); + break; + } + case 4: { + message.awsRoleArn = reader.string(); + break; + } + case 5: { + message.gcpServiceAccount = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AwsMsk message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.pubsub.v1.IngestionDataSourceSettings.AwsMsk} AwsMsk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsMsk.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AwsMsk message. + * @function verify + * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AwsMsk.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.clusterArn != null && message.hasOwnProperty("clusterArn")) + if (!$util.isString(message.clusterArn)) + return "clusterArn: string expected"; + if (message.topic != null && message.hasOwnProperty("topic")) + if (!$util.isString(message.topic)) + return "topic: string expected"; + if (message.awsRoleArn != null && message.hasOwnProperty("awsRoleArn")) + if (!$util.isString(message.awsRoleArn)) + return "awsRoleArn: string expected"; + if (message.gcpServiceAccount != null && message.hasOwnProperty("gcpServiceAccount")) + if (!$util.isString(message.gcpServiceAccount)) + return "gcpServiceAccount: string expected"; + return null; + }; + + /** + * Creates an AwsMsk message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk + * @static + * @param {Object.} object Plain object + * @returns {google.pubsub.v1.IngestionDataSourceSettings.AwsMsk} AwsMsk + */ + AwsMsk.fromObject = function fromObject(object) { + if (object instanceof $root.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk) + return object; + var message = new $root.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk(); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ACTIVE": + case 1: + message.state = 1; + break; + case "MSK_PERMISSION_DENIED": + case 2: + message.state = 2; + break; + case "PUBLISH_PERMISSION_DENIED": + case 3: + message.state = 3; + break; + case "CLUSTER_NOT_FOUND": + case 4: + message.state = 4; + break; + case "TOPIC_NOT_FOUND": + case 5: + message.state = 5; + break; + } + if (object.clusterArn != null) + message.clusterArn = String(object.clusterArn); + if (object.topic != null) + message.topic = String(object.topic); + if (object.awsRoleArn != null) + message.awsRoleArn = String(object.awsRoleArn); + if (object.gcpServiceAccount != null) + message.gcpServiceAccount = String(object.gcpServiceAccount); + return message; + }; + + /** + * Creates a plain object from an AwsMsk message. Also converts values to other types if specified. + * @function toObject + * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk + * @static + * @param {google.pubsub.v1.IngestionDataSourceSettings.AwsMsk} message AwsMsk + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AwsMsk.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.clusterArn = ""; + object.topic = ""; + object.awsRoleArn = ""; + object.gcpServiceAccount = ""; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State[message.state] === undefined ? message.state : $root.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State[message.state] : message.state; + if (message.clusterArn != null && message.hasOwnProperty("clusterArn")) + object.clusterArn = message.clusterArn; + if (message.topic != null && message.hasOwnProperty("topic")) + object.topic = message.topic; + if (message.awsRoleArn != null && message.hasOwnProperty("awsRoleArn")) + object.awsRoleArn = message.awsRoleArn; + if (message.gcpServiceAccount != null && message.hasOwnProperty("gcpServiceAccount")) + object.gcpServiceAccount = message.gcpServiceAccount; + return object; + }; + + /** + * Converts this AwsMsk to JSON. + * @function toJSON + * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk + * @instance + * @returns {Object.} JSON object + */ + AwsMsk.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AwsMsk + * @function getTypeUrl + * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AwsMsk.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.pubsub.v1.IngestionDataSourceSettings.AwsMsk"; + }; + + /** + * State enum. + * @name google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} MSK_PERMISSION_DENIED=2 MSK_PERMISSION_DENIED value + * @property {number} PUBLISH_PERMISSION_DENIED=3 PUBLISH_PERMISSION_DENIED value + * @property {number} CLUSTER_NOT_FOUND=4 CLUSTER_NOT_FOUND value + * @property {number} TOPIC_NOT_FOUND=5 TOPIC_NOT_FOUND value + */ + AwsMsk.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "MSK_PERMISSION_DENIED"] = 2; + values[valuesById[3] = "PUBLISH_PERMISSION_DENIED"] = 3; + values[valuesById[4] = "CLUSTER_NOT_FOUND"] = 4; + values[valuesById[5] = "TOPIC_NOT_FOUND"] = 5; + return values; + })(); + + return AwsMsk; + })(); + + IngestionDataSourceSettings.ConfluentCloud = (function() { + + /** + * Properties of a ConfluentCloud. + * @memberof google.pubsub.v1.IngestionDataSourceSettings + * @interface IConfluentCloud + * @property {google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State|null} [state] ConfluentCloud state + * @property {string|null} [bootstrapServer] ConfluentCloud bootstrapServer + * @property {string|null} [clusterId] ConfluentCloud clusterId + * @property {string|null} [topic] ConfluentCloud topic + * @property {string|null} [identityPoolId] ConfluentCloud identityPoolId + * @property {string|null} [gcpServiceAccount] ConfluentCloud gcpServiceAccount + */ + + /** + * Constructs a new ConfluentCloud. + * @memberof google.pubsub.v1.IngestionDataSourceSettings + * @classdesc Represents a ConfluentCloud. + * @implements IConfluentCloud + * @constructor + * @param {google.pubsub.v1.IngestionDataSourceSettings.IConfluentCloud=} [properties] Properties to set + */ + function ConfluentCloud(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]]; + } + + /** + * ConfluentCloud state. + * @member {google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State} state + * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud + * @instance + */ + ConfluentCloud.prototype.state = 0; + + /** + * ConfluentCloud bootstrapServer. + * @member {string} bootstrapServer + * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud + * @instance + */ + ConfluentCloud.prototype.bootstrapServer = ""; + + /** + * ConfluentCloud clusterId. + * @member {string} clusterId + * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud + * @instance + */ + ConfluentCloud.prototype.clusterId = ""; + + /** + * ConfluentCloud topic. + * @member {string} topic + * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud + * @instance + */ + ConfluentCloud.prototype.topic = ""; + + /** + * ConfluentCloud identityPoolId. + * @member {string} identityPoolId + * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud + * @instance + */ + ConfluentCloud.prototype.identityPoolId = ""; + + /** + * ConfluentCloud gcpServiceAccount. + * @member {string} gcpServiceAccount + * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud + * @instance + */ + ConfluentCloud.prototype.gcpServiceAccount = ""; + + /** + * Creates a new ConfluentCloud instance using the specified properties. + * @function create + * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud + * @static + * @param {google.pubsub.v1.IngestionDataSourceSettings.IConfluentCloud=} [properties] Properties to set + * @returns {google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud} ConfluentCloud instance + */ + ConfluentCloud.create = function create(properties) { + return new ConfluentCloud(properties); + }; + + /** + * Encodes the specified ConfluentCloud message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.verify|verify} messages. + * @function encode + * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud + * @static + * @param {google.pubsub.v1.IngestionDataSourceSettings.IConfluentCloud} message ConfluentCloud message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfluentCloud.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.bootstrapServer != null && Object.hasOwnProperty.call(message, "bootstrapServer")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.bootstrapServer); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.topic); + if (message.identityPoolId != null && Object.hasOwnProperty.call(message, "identityPoolId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.identityPoolId); + if (message.gcpServiceAccount != null && Object.hasOwnProperty.call(message, "gcpServiceAccount")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.gcpServiceAccount); + return writer; + }; + + /** + * Encodes the specified ConfluentCloud message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.verify|verify} messages. + * @function encodeDelimited + * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud + * @static + * @param {google.pubsub.v1.IngestionDataSourceSettings.IConfluentCloud} message ConfluentCloud message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfluentCloud.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConfluentCloud message from the specified reader or buffer. + * @function decode + * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud} ConfluentCloud + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfluentCloud.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.state = reader.int32(); + break; + } + case 2: { + message.bootstrapServer = reader.string(); + break; + } + case 3: { + message.clusterId = reader.string(); + break; + } + case 4: { + message.topic = reader.string(); + break; + } + case 5: { + message.identityPoolId = reader.string(); + break; + } + case 6: { + message.gcpServiceAccount = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConfluentCloud message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud} ConfluentCloud + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfluentCloud.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConfluentCloud message. + * @function verify + * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConfluentCloud.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.bootstrapServer != null && message.hasOwnProperty("bootstrapServer")) + if (!$util.isString(message.bootstrapServer)) + return "bootstrapServer: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.topic != null && message.hasOwnProperty("topic")) + if (!$util.isString(message.topic)) + return "topic: string expected"; + if (message.identityPoolId != null && message.hasOwnProperty("identityPoolId")) + if (!$util.isString(message.identityPoolId)) + return "identityPoolId: string expected"; + if (message.gcpServiceAccount != null && message.hasOwnProperty("gcpServiceAccount")) + if (!$util.isString(message.gcpServiceAccount)) + return "gcpServiceAccount: string expected"; + return null; + }; + + /** + * Creates a ConfluentCloud message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud + * @static + * @param {Object.} object Plain object + * @returns {google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud} ConfluentCloud + */ + ConfluentCloud.fromObject = function fromObject(object) { + if (object instanceof $root.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud) + return object; + var message = new $root.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud(); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ACTIVE": + case 1: + message.state = 1; + break; + case "CONFLUENT_CLOUD_PERMISSION_DENIED": + case 2: + message.state = 2; + break; + case "PUBLISH_PERMISSION_DENIED": + case 3: + message.state = 3; + break; + case "UNREACHABLE_BOOTSTRAP_SERVER": + case 4: + message.state = 4; + break; + case "CLUSTER_NOT_FOUND": + case 5: + message.state = 5; + break; + case "TOPIC_NOT_FOUND": + case 6: + message.state = 6; + break; + } + if (object.bootstrapServer != null) + message.bootstrapServer = String(object.bootstrapServer); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.topic != null) + message.topic = String(object.topic); + if (object.identityPoolId != null) + message.identityPoolId = String(object.identityPoolId); + if (object.gcpServiceAccount != null) + message.gcpServiceAccount = String(object.gcpServiceAccount); + return message; + }; + + /** + * Creates a plain object from a ConfluentCloud message. Also converts values to other types if specified. + * @function toObject + * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud + * @static + * @param {google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud} message ConfluentCloud + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConfluentCloud.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.bootstrapServer = ""; + object.clusterId = ""; + object.topic = ""; + object.identityPoolId = ""; + object.gcpServiceAccount = ""; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State[message.state] === undefined ? message.state : $root.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State[message.state] : message.state; + if (message.bootstrapServer != null && message.hasOwnProperty("bootstrapServer")) + object.bootstrapServer = message.bootstrapServer; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.topic != null && message.hasOwnProperty("topic")) + object.topic = message.topic; + if (message.identityPoolId != null && message.hasOwnProperty("identityPoolId")) + object.identityPoolId = message.identityPoolId; + if (message.gcpServiceAccount != null && message.hasOwnProperty("gcpServiceAccount")) + object.gcpServiceAccount = message.gcpServiceAccount; + return object; + }; + + /** + * Converts this ConfluentCloud to JSON. + * @function toJSON + * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud + * @instance + * @returns {Object.} JSON object + */ + ConfluentCloud.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConfluentCloud + * @function getTypeUrl + * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConfluentCloud.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud"; + }; + + /** + * State enum. + * @name google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} CONFLUENT_CLOUD_PERMISSION_DENIED=2 CONFLUENT_CLOUD_PERMISSION_DENIED value + * @property {number} PUBLISH_PERMISSION_DENIED=3 PUBLISH_PERMISSION_DENIED value + * @property {number} UNREACHABLE_BOOTSTRAP_SERVER=4 UNREACHABLE_BOOTSTRAP_SERVER value + * @property {number} CLUSTER_NOT_FOUND=5 CLUSTER_NOT_FOUND value + * @property {number} TOPIC_NOT_FOUND=6 TOPIC_NOT_FOUND value + */ + ConfluentCloud.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "CONFLUENT_CLOUD_PERMISSION_DENIED"] = 2; + values[valuesById[3] = "PUBLISH_PERMISSION_DENIED"] = 3; + values[valuesById[4] = "UNREACHABLE_BOOTSTRAP_SERVER"] = 4; + values[valuesById[5] = "CLUSTER_NOT_FOUND"] = 5; + values[valuesById[6] = "TOPIC_NOT_FOUND"] = 6; + return values; + })(); + + return ConfluentCloud; + })(); + + return IngestionDataSourceSettings; + })(); + + v1.PlatformLogsSettings = (function() { + + /** + * Properties of a PlatformLogsSettings. + * @memberof google.pubsub.v1 + * @interface IPlatformLogsSettings + * @property {google.pubsub.v1.PlatformLogsSettings.Severity|null} [severity] PlatformLogsSettings severity + */ + + /** + * Constructs a new PlatformLogsSettings. + * @memberof google.pubsub.v1 + * @classdesc Represents a PlatformLogsSettings. + * @implements IPlatformLogsSettings + * @constructor + * @param {google.pubsub.v1.IPlatformLogsSettings=} [properties] Properties to set + */ + function PlatformLogsSettings(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]]; + } + + /** + * PlatformLogsSettings severity. + * @member {google.pubsub.v1.PlatformLogsSettings.Severity} severity + * @memberof google.pubsub.v1.PlatformLogsSettings + * @instance + */ + PlatformLogsSettings.prototype.severity = 0; + + /** + * Creates a new PlatformLogsSettings instance using the specified properties. + * @function create + * @memberof google.pubsub.v1.PlatformLogsSettings + * @static + * @param {google.pubsub.v1.IPlatformLogsSettings=} [properties] Properties to set + * @returns {google.pubsub.v1.PlatformLogsSettings} PlatformLogsSettings instance + */ + PlatformLogsSettings.create = function create(properties) { + return new PlatformLogsSettings(properties); + }; + + /** + * Encodes the specified PlatformLogsSettings message. Does not implicitly {@link google.pubsub.v1.PlatformLogsSettings.verify|verify} messages. + * @function encode + * @memberof google.pubsub.v1.PlatformLogsSettings + * @static + * @param {google.pubsub.v1.IPlatformLogsSettings} message PlatformLogsSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlatformLogsSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.severity); + return writer; + }; + + /** + * Encodes the specified PlatformLogsSettings message, length delimited. Does not implicitly {@link google.pubsub.v1.PlatformLogsSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.pubsub.v1.PlatformLogsSettings + * @static + * @param {google.pubsub.v1.IPlatformLogsSettings} message PlatformLogsSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlatformLogsSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PlatformLogsSettings message from the specified reader or buffer. + * @function decode + * @memberof google.pubsub.v1.PlatformLogsSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.pubsub.v1.PlatformLogsSettings} PlatformLogsSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlatformLogsSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.PlatformLogsSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.severity = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PlatformLogsSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.pubsub.v1.PlatformLogsSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.pubsub.v1.PlatformLogsSettings} PlatformLogsSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlatformLogsSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PlatformLogsSettings message. + * @function verify + * @memberof google.pubsub.v1.PlatformLogsSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PlatformLogsSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.severity != null && message.hasOwnProperty("severity")) + switch (message.severity) { + default: + return "severity: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + return null; + }; + + /** + * Creates a PlatformLogsSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.pubsub.v1.PlatformLogsSettings + * @static + * @param {Object.} object Plain object + * @returns {google.pubsub.v1.PlatformLogsSettings} PlatformLogsSettings + */ + PlatformLogsSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.pubsub.v1.PlatformLogsSettings) + return object; + var message = new $root.google.pubsub.v1.PlatformLogsSettings(); + switch (object.severity) { + default: + if (typeof object.severity === "number") { + message.severity = object.severity; + break; + } + break; + case "SEVERITY_UNSPECIFIED": + case 0: + message.severity = 0; + break; + case "DISABLED": + case 1: + message.severity = 1; + break; case "DEBUG": case 2: message.severity = 2; @@ -2793,366 +4082,1173 @@ return message; }; - /** - * Creates a plain object from a PlatformLogsSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.PlatformLogsSettings - * @static - * @param {google.pubsub.v1.PlatformLogsSettings} message PlatformLogsSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PlatformLogsSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; - if (message.severity != null && message.hasOwnProperty("severity")) - object.severity = options.enums === String ? $root.google.pubsub.v1.PlatformLogsSettings.Severity[message.severity] === undefined ? message.severity : $root.google.pubsub.v1.PlatformLogsSettings.Severity[message.severity] : message.severity; - return object; - }; + /** + * Creates a plain object from a PlatformLogsSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.pubsub.v1.PlatformLogsSettings + * @static + * @param {google.pubsub.v1.PlatformLogsSettings} message PlatformLogsSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PlatformLogsSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; + if (message.severity != null && message.hasOwnProperty("severity")) + object.severity = options.enums === String ? $root.google.pubsub.v1.PlatformLogsSettings.Severity[message.severity] === undefined ? message.severity : $root.google.pubsub.v1.PlatformLogsSettings.Severity[message.severity] : message.severity; + return object; + }; + + /** + * Converts this PlatformLogsSettings to JSON. + * @function toJSON + * @memberof google.pubsub.v1.PlatformLogsSettings + * @instance + * @returns {Object.} JSON object + */ + PlatformLogsSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PlatformLogsSettings + * @function getTypeUrl + * @memberof google.pubsub.v1.PlatformLogsSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PlatformLogsSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.pubsub.v1.PlatformLogsSettings"; + }; + + /** + * Severity enum. + * @name google.pubsub.v1.PlatformLogsSettings.Severity + * @enum {number} + * @property {number} SEVERITY_UNSPECIFIED=0 SEVERITY_UNSPECIFIED value + * @property {number} DISABLED=1 DISABLED value + * @property {number} DEBUG=2 DEBUG value + * @property {number} INFO=3 INFO value + * @property {number} WARNING=4 WARNING value + * @property {number} ERROR=5 ERROR value + */ + PlatformLogsSettings.Severity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SEVERITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "DISABLED"] = 1; + values[valuesById[2] = "DEBUG"] = 2; + values[valuesById[3] = "INFO"] = 3; + values[valuesById[4] = "WARNING"] = 4; + values[valuesById[5] = "ERROR"] = 5; + return values; + })(); + + return PlatformLogsSettings; + })(); + + v1.IngestionFailureEvent = (function() { + + /** + * Properties of an IngestionFailureEvent. + * @memberof google.pubsub.v1 + * @interface IIngestionFailureEvent + * @property {string|null} [topic] IngestionFailureEvent topic + * @property {string|null} [errorMessage] IngestionFailureEvent errorMessage + * @property {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure|null} [cloudStorageFailure] IngestionFailureEvent cloudStorageFailure + * @property {google.pubsub.v1.IngestionFailureEvent.IAwsMskFailureReason|null} [awsMskFailure] IngestionFailureEvent awsMskFailure + * @property {google.pubsub.v1.IngestionFailureEvent.IAzureEventHubsFailureReason|null} [azureEventHubsFailure] IngestionFailureEvent azureEventHubsFailure + * @property {google.pubsub.v1.IngestionFailureEvent.IConfluentCloudFailureReason|null} [confluentCloudFailure] IngestionFailureEvent confluentCloudFailure + */ + + /** + * Constructs a new IngestionFailureEvent. + * @memberof google.pubsub.v1 + * @classdesc Represents an IngestionFailureEvent. + * @implements IIngestionFailureEvent + * @constructor + * @param {google.pubsub.v1.IIngestionFailureEvent=} [properties] Properties to set + */ + function IngestionFailureEvent(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]]; + } + + /** + * IngestionFailureEvent topic. + * @member {string} topic + * @memberof google.pubsub.v1.IngestionFailureEvent + * @instance + */ + IngestionFailureEvent.prototype.topic = ""; + + /** + * IngestionFailureEvent errorMessage. + * @member {string} errorMessage + * @memberof google.pubsub.v1.IngestionFailureEvent + * @instance + */ + IngestionFailureEvent.prototype.errorMessage = ""; + + /** + * IngestionFailureEvent cloudStorageFailure. + * @member {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure|null|undefined} cloudStorageFailure + * @memberof google.pubsub.v1.IngestionFailureEvent + * @instance + */ + IngestionFailureEvent.prototype.cloudStorageFailure = null; + + /** + * IngestionFailureEvent awsMskFailure. + * @member {google.pubsub.v1.IngestionFailureEvent.IAwsMskFailureReason|null|undefined} awsMskFailure + * @memberof google.pubsub.v1.IngestionFailureEvent + * @instance + */ + IngestionFailureEvent.prototype.awsMskFailure = null; + + /** + * IngestionFailureEvent azureEventHubsFailure. + * @member {google.pubsub.v1.IngestionFailureEvent.IAzureEventHubsFailureReason|null|undefined} azureEventHubsFailure + * @memberof google.pubsub.v1.IngestionFailureEvent + * @instance + */ + IngestionFailureEvent.prototype.azureEventHubsFailure = null; + + /** + * IngestionFailureEvent confluentCloudFailure. + * @member {google.pubsub.v1.IngestionFailureEvent.IConfluentCloudFailureReason|null|undefined} confluentCloudFailure + * @memberof google.pubsub.v1.IngestionFailureEvent + * @instance + */ + IngestionFailureEvent.prototype.confluentCloudFailure = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * IngestionFailureEvent failure. + * @member {"cloudStorageFailure"|"awsMskFailure"|"azureEventHubsFailure"|"confluentCloudFailure"|undefined} failure + * @memberof google.pubsub.v1.IngestionFailureEvent + * @instance + */ + Object.defineProperty(IngestionFailureEvent.prototype, "failure", { + get: $util.oneOfGetter($oneOfFields = ["cloudStorageFailure", "awsMskFailure", "azureEventHubsFailure", "confluentCloudFailure"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new IngestionFailureEvent instance using the specified properties. + * @function create + * @memberof google.pubsub.v1.IngestionFailureEvent + * @static + * @param {google.pubsub.v1.IIngestionFailureEvent=} [properties] Properties to set + * @returns {google.pubsub.v1.IngestionFailureEvent} IngestionFailureEvent instance + */ + IngestionFailureEvent.create = function create(properties) { + return new IngestionFailureEvent(properties); + }; + + /** + * Encodes the specified IngestionFailureEvent message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.verify|verify} messages. + * @function encode + * @memberof google.pubsub.v1.IngestionFailureEvent + * @static + * @param {google.pubsub.v1.IIngestionFailureEvent} message IngestionFailureEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestionFailureEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.topic); + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.errorMessage); + if (message.cloudStorageFailure != null && Object.hasOwnProperty.call(message, "cloudStorageFailure")) + $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.encode(message.cloudStorageFailure, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.awsMskFailure != null && Object.hasOwnProperty.call(message, "awsMskFailure")) + $root.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.encode(message.awsMskFailure, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.azureEventHubsFailure != null && Object.hasOwnProperty.call(message, "azureEventHubsFailure")) + $root.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.encode(message.azureEventHubsFailure, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.confluentCloudFailure != null && Object.hasOwnProperty.call(message, "confluentCloudFailure")) + $root.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.encode(message.confluentCloudFailure, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified IngestionFailureEvent message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.pubsub.v1.IngestionFailureEvent + * @static + * @param {google.pubsub.v1.IIngestionFailureEvent} message IngestionFailureEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestionFailureEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IngestionFailureEvent message from the specified reader or buffer. + * @function decode + * @memberof google.pubsub.v1.IngestionFailureEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.pubsub.v1.IngestionFailureEvent} IngestionFailureEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestionFailureEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.topic = reader.string(); + break; + } + case 2: { + message.errorMessage = reader.string(); + break; + } + case 3: { + message.cloudStorageFailure = $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.decode(reader, reader.uint32()); + break; + } + case 4: { + message.awsMskFailure = $root.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.decode(reader, reader.uint32()); + break; + } + case 5: { + message.azureEventHubsFailure = $root.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.decode(reader, reader.uint32()); + break; + } + case 6: { + message.confluentCloudFailure = $root.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IngestionFailureEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.pubsub.v1.IngestionFailureEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.pubsub.v1.IngestionFailureEvent} IngestionFailureEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestionFailureEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IngestionFailureEvent message. + * @function verify + * @memberof google.pubsub.v1.IngestionFailureEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IngestionFailureEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.topic != null && message.hasOwnProperty("topic")) + if (!$util.isString(message.topic)) + return "topic: string expected"; + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + if (!$util.isString(message.errorMessage)) + return "errorMessage: string expected"; + if (message.cloudStorageFailure != null && message.hasOwnProperty("cloudStorageFailure")) { + properties.failure = 1; + { + var error = $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.verify(message.cloudStorageFailure); + if (error) + return "cloudStorageFailure." + error; + } + } + if (message.awsMskFailure != null && message.hasOwnProperty("awsMskFailure")) { + if (properties.failure === 1) + return "failure: multiple values"; + properties.failure = 1; + { + var error = $root.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.verify(message.awsMskFailure); + if (error) + return "awsMskFailure." + error; + } + } + if (message.azureEventHubsFailure != null && message.hasOwnProperty("azureEventHubsFailure")) { + if (properties.failure === 1) + return "failure: multiple values"; + properties.failure = 1; + { + var error = $root.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.verify(message.azureEventHubsFailure); + if (error) + return "azureEventHubsFailure." + error; + } + } + if (message.confluentCloudFailure != null && message.hasOwnProperty("confluentCloudFailure")) { + if (properties.failure === 1) + return "failure: multiple values"; + properties.failure = 1; + { + var error = $root.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.verify(message.confluentCloudFailure); + if (error) + return "confluentCloudFailure." + error; + } + } + return null; + }; + + /** + * Creates an IngestionFailureEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.pubsub.v1.IngestionFailureEvent + * @static + * @param {Object.} object Plain object + * @returns {google.pubsub.v1.IngestionFailureEvent} IngestionFailureEvent + */ + IngestionFailureEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent) + return object; + var message = new $root.google.pubsub.v1.IngestionFailureEvent(); + if (object.topic != null) + message.topic = String(object.topic); + if (object.errorMessage != null) + message.errorMessage = String(object.errorMessage); + if (object.cloudStorageFailure != null) { + if (typeof object.cloudStorageFailure !== "object") + throw TypeError(".google.pubsub.v1.IngestionFailureEvent.cloudStorageFailure: object expected"); + message.cloudStorageFailure = $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.fromObject(object.cloudStorageFailure); + } + if (object.awsMskFailure != null) { + if (typeof object.awsMskFailure !== "object") + throw TypeError(".google.pubsub.v1.IngestionFailureEvent.awsMskFailure: object expected"); + message.awsMskFailure = $root.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.fromObject(object.awsMskFailure); + } + if (object.azureEventHubsFailure != null) { + if (typeof object.azureEventHubsFailure !== "object") + throw TypeError(".google.pubsub.v1.IngestionFailureEvent.azureEventHubsFailure: object expected"); + message.azureEventHubsFailure = $root.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.fromObject(object.azureEventHubsFailure); + } + if (object.confluentCloudFailure != null) { + if (typeof object.confluentCloudFailure !== "object") + throw TypeError(".google.pubsub.v1.IngestionFailureEvent.confluentCloudFailure: object expected"); + message.confluentCloudFailure = $root.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.fromObject(object.confluentCloudFailure); + } + return message; + }; + + /** + * Creates a plain object from an IngestionFailureEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.pubsub.v1.IngestionFailureEvent + * @static + * @param {google.pubsub.v1.IngestionFailureEvent} message IngestionFailureEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IngestionFailureEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.topic = ""; + object.errorMessage = ""; + } + if (message.topic != null && message.hasOwnProperty("topic")) + object.topic = message.topic; + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + object.errorMessage = message.errorMessage; + if (message.cloudStorageFailure != null && message.hasOwnProperty("cloudStorageFailure")) { + object.cloudStorageFailure = $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.toObject(message.cloudStorageFailure, options); + if (options.oneofs) + object.failure = "cloudStorageFailure"; + } + if (message.awsMskFailure != null && message.hasOwnProperty("awsMskFailure")) { + object.awsMskFailure = $root.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.toObject(message.awsMskFailure, options); + if (options.oneofs) + object.failure = "awsMskFailure"; + } + if (message.azureEventHubsFailure != null && message.hasOwnProperty("azureEventHubsFailure")) { + object.azureEventHubsFailure = $root.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.toObject(message.azureEventHubsFailure, options); + if (options.oneofs) + object.failure = "azureEventHubsFailure"; + } + if (message.confluentCloudFailure != null && message.hasOwnProperty("confluentCloudFailure")) { + object.confluentCloudFailure = $root.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.toObject(message.confluentCloudFailure, options); + if (options.oneofs) + object.failure = "confluentCloudFailure"; + } + return object; + }; + + /** + * Converts this IngestionFailureEvent to JSON. + * @function toJSON + * @memberof google.pubsub.v1.IngestionFailureEvent + * @instance + * @returns {Object.} JSON object + */ + IngestionFailureEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IngestionFailureEvent + * @function getTypeUrl + * @memberof google.pubsub.v1.IngestionFailureEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IngestionFailureEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent"; + }; + + IngestionFailureEvent.ApiViolationReason = (function() { + + /** + * Properties of an ApiViolationReason. + * @memberof google.pubsub.v1.IngestionFailureEvent + * @interface IApiViolationReason + */ + + /** + * Constructs a new ApiViolationReason. + * @memberof google.pubsub.v1.IngestionFailureEvent + * @classdesc Represents an ApiViolationReason. + * @implements IApiViolationReason + * @constructor + * @param {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason=} [properties] Properties to set + */ + function ApiViolationReason(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]]; + } + + /** + * Creates a new ApiViolationReason instance using the specified properties. + * @function create + * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason + * @static + * @param {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason=} [properties] Properties to set + * @returns {google.pubsub.v1.IngestionFailureEvent.ApiViolationReason} ApiViolationReason instance + */ + ApiViolationReason.create = function create(properties) { + return new ApiViolationReason(properties); + }; + + /** + * Encodes the specified ApiViolationReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.verify|verify} messages. + * @function encode + * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason + * @static + * @param {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason} message ApiViolationReason message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ApiViolationReason.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified ApiViolationReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.verify|verify} messages. + * @function encodeDelimited + * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason + * @static + * @param {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason} message ApiViolationReason message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ApiViolationReason.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ApiViolationReason message from the specified reader or buffer. + * @function decode + * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.pubsub.v1.IngestionFailureEvent.ApiViolationReason} ApiViolationReason + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ApiViolationReason.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ApiViolationReason message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.pubsub.v1.IngestionFailureEvent.ApiViolationReason} ApiViolationReason + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ApiViolationReason.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ApiViolationReason message. + * @function verify + * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ApiViolationReason.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an ApiViolationReason message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason + * @static + * @param {Object.} object Plain object + * @returns {google.pubsub.v1.IngestionFailureEvent.ApiViolationReason} ApiViolationReason + */ + ApiViolationReason.fromObject = function fromObject(object) { + if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) + return object; + return new $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason(); + }; + + /** + * Creates a plain object from an ApiViolationReason message. Also converts values to other types if specified. + * @function toObject + * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason + * @static + * @param {google.pubsub.v1.IngestionFailureEvent.ApiViolationReason} message ApiViolationReason + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ApiViolationReason.toObject = function toObject() { + return {}; + }; - /** - * Converts this PlatformLogsSettings to JSON. - * @function toJSON - * @memberof google.pubsub.v1.PlatformLogsSettings - * @instance - * @returns {Object.} JSON object - */ - PlatformLogsSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this ApiViolationReason to JSON. + * @function toJSON + * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason + * @instance + * @returns {Object.} JSON object + */ + ApiViolationReason.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for PlatformLogsSettings - * @function getTypeUrl - * @memberof google.pubsub.v1.PlatformLogsSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PlatformLogsSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + /** + * Gets the default type url for ApiViolationReason + * @function getTypeUrl + * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ApiViolationReason.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent.ApiViolationReason"; + }; + + return ApiViolationReason; + })(); + + IngestionFailureEvent.AvroFailureReason = (function() { + + /** + * Properties of an AvroFailureReason. + * @memberof google.pubsub.v1.IngestionFailureEvent + * @interface IAvroFailureReason + */ + + /** + * Constructs a new AvroFailureReason. + * @memberof google.pubsub.v1.IngestionFailureEvent + * @classdesc Represents an AvroFailureReason. + * @implements IAvroFailureReason + * @constructor + * @param {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason=} [properties] Properties to set + */ + function AvroFailureReason(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]]; } - return typeUrlPrefix + "/google.pubsub.v1.PlatformLogsSettings"; - }; - /** - * Severity enum. - * @name google.pubsub.v1.PlatformLogsSettings.Severity - * @enum {number} - * @property {number} SEVERITY_UNSPECIFIED=0 SEVERITY_UNSPECIFIED value - * @property {number} DISABLED=1 DISABLED value - * @property {number} DEBUG=2 DEBUG value - * @property {number} INFO=3 INFO value - * @property {number} WARNING=4 WARNING value - * @property {number} ERROR=5 ERROR value - */ - PlatformLogsSettings.Severity = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SEVERITY_UNSPECIFIED"] = 0; - values[valuesById[1] = "DISABLED"] = 1; - values[valuesById[2] = "DEBUG"] = 2; - values[valuesById[3] = "INFO"] = 3; - values[valuesById[4] = "WARNING"] = 4; - values[valuesById[5] = "ERROR"] = 5; - return values; + /** + * Creates a new AvroFailureReason instance using the specified properties. + * @function create + * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason + * @static + * @param {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason=} [properties] Properties to set + * @returns {google.pubsub.v1.IngestionFailureEvent.AvroFailureReason} AvroFailureReason instance + */ + AvroFailureReason.create = function create(properties) { + return new AvroFailureReason(properties); + }; + + /** + * Encodes the specified AvroFailureReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.verify|verify} messages. + * @function encode + * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason + * @static + * @param {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason} message AvroFailureReason message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AvroFailureReason.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified AvroFailureReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.verify|verify} messages. + * @function encodeDelimited + * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason + * @static + * @param {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason} message AvroFailureReason message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AvroFailureReason.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AvroFailureReason message from the specified reader or buffer. + * @function decode + * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.pubsub.v1.IngestionFailureEvent.AvroFailureReason} AvroFailureReason + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AvroFailureReason.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AvroFailureReason message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.pubsub.v1.IngestionFailureEvent.AvroFailureReason} AvroFailureReason + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AvroFailureReason.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AvroFailureReason message. + * @function verify + * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AvroFailureReason.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an AvroFailureReason message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason + * @static + * @param {Object.} object Plain object + * @returns {google.pubsub.v1.IngestionFailureEvent.AvroFailureReason} AvroFailureReason + */ + AvroFailureReason.fromObject = function fromObject(object) { + if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason) + return object; + return new $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason(); + }; + + /** + * Creates a plain object from an AvroFailureReason message. Also converts values to other types if specified. + * @function toObject + * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason + * @static + * @param {google.pubsub.v1.IngestionFailureEvent.AvroFailureReason} message AvroFailureReason + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AvroFailureReason.toObject = function toObject() { + return {}; + }; + + /** + * Converts this AvroFailureReason to JSON. + * @function toJSON + * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason + * @instance + * @returns {Object.} JSON object + */ + AvroFailureReason.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AvroFailureReason + * @function getTypeUrl + * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AvroFailureReason.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent.AvroFailureReason"; + }; + + return AvroFailureReason; })(); - return PlatformLogsSettings; - })(); + IngestionFailureEvent.CloudStorageFailure = (function() { - v1.IngestionFailureEvent = (function() { + /** + * Properties of a CloudStorageFailure. + * @memberof google.pubsub.v1.IngestionFailureEvent + * @interface ICloudStorageFailure + * @property {string|null} [bucket] CloudStorageFailure bucket + * @property {string|null} [objectName] CloudStorageFailure objectName + * @property {number|Long|null} [objectGeneration] CloudStorageFailure objectGeneration + * @property {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason|null} [avroFailureReason] CloudStorageFailure avroFailureReason + * @property {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null} [apiViolationReason] CloudStorageFailure apiViolationReason + */ - /** - * Properties of an IngestionFailureEvent. - * @memberof google.pubsub.v1 - * @interface IIngestionFailureEvent - * @property {string|null} [topic] IngestionFailureEvent topic - * @property {string|null} [errorMessage] IngestionFailureEvent errorMessage - * @property {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure|null} [cloudStorageFailure] IngestionFailureEvent cloudStorageFailure - */ + /** + * Constructs a new CloudStorageFailure. + * @memberof google.pubsub.v1.IngestionFailureEvent + * @classdesc Represents a CloudStorageFailure. + * @implements ICloudStorageFailure + * @constructor + * @param {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure=} [properties] Properties to set + */ + function CloudStorageFailure(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]]; + } - /** - * Constructs a new IngestionFailureEvent. - * @memberof google.pubsub.v1 - * @classdesc Represents an IngestionFailureEvent. - * @implements IIngestionFailureEvent - * @constructor - * @param {google.pubsub.v1.IIngestionFailureEvent=} [properties] Properties to set - */ - function IngestionFailureEvent(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]]; - } + /** + * CloudStorageFailure bucket. + * @member {string} bucket + * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + * @instance + */ + CloudStorageFailure.prototype.bucket = ""; - /** - * IngestionFailureEvent topic. - * @member {string} topic - * @memberof google.pubsub.v1.IngestionFailureEvent - * @instance - */ - IngestionFailureEvent.prototype.topic = ""; + /** + * CloudStorageFailure objectName. + * @member {string} objectName + * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + * @instance + */ + CloudStorageFailure.prototype.objectName = ""; - /** - * IngestionFailureEvent errorMessage. - * @member {string} errorMessage - * @memberof google.pubsub.v1.IngestionFailureEvent - * @instance - */ - IngestionFailureEvent.prototype.errorMessage = ""; + /** + * CloudStorageFailure objectGeneration. + * @member {number|Long} objectGeneration + * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + * @instance + */ + CloudStorageFailure.prototype.objectGeneration = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * IngestionFailureEvent cloudStorageFailure. - * @member {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure|null|undefined} cloudStorageFailure - * @memberof google.pubsub.v1.IngestionFailureEvent - * @instance - */ - IngestionFailureEvent.prototype.cloudStorageFailure = null; + /** + * CloudStorageFailure avroFailureReason. + * @member {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason|null|undefined} avroFailureReason + * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + * @instance + */ + CloudStorageFailure.prototype.avroFailureReason = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * CloudStorageFailure apiViolationReason. + * @member {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null|undefined} apiViolationReason + * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + * @instance + */ + CloudStorageFailure.prototype.apiViolationReason = null; - /** - * IngestionFailureEvent failure. - * @member {"cloudStorageFailure"|undefined} failure - * @memberof google.pubsub.v1.IngestionFailureEvent - * @instance - */ - Object.defineProperty(IngestionFailureEvent.prototype, "failure", { - get: $util.oneOfGetter($oneOfFields = ["cloudStorageFailure"]), - set: $util.oneOfSetter($oneOfFields) - }); + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Creates a new IngestionFailureEvent instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.IngestionFailureEvent - * @static - * @param {google.pubsub.v1.IIngestionFailureEvent=} [properties] Properties to set - * @returns {google.pubsub.v1.IngestionFailureEvent} IngestionFailureEvent instance - */ - IngestionFailureEvent.create = function create(properties) { - return new IngestionFailureEvent(properties); - }; + /** + * CloudStorageFailure reason. + * @member {"avroFailureReason"|"apiViolationReason"|undefined} reason + * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + * @instance + */ + Object.defineProperty(CloudStorageFailure.prototype, "reason", { + get: $util.oneOfGetter($oneOfFields = ["avroFailureReason", "apiViolationReason"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Encodes the specified IngestionFailureEvent message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.IngestionFailureEvent - * @static - * @param {google.pubsub.v1.IIngestionFailureEvent} message IngestionFailureEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IngestionFailureEvent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.topic); - if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.errorMessage); - if (message.cloudStorageFailure != null && Object.hasOwnProperty.call(message, "cloudStorageFailure")) - $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.encode(message.cloudStorageFailure, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + /** + * Creates a new CloudStorageFailure instance using the specified properties. + * @function create + * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + * @static + * @param {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure=} [properties] Properties to set + * @returns {google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure} CloudStorageFailure instance + */ + CloudStorageFailure.create = function create(properties) { + return new CloudStorageFailure(properties); + }; - /** - * Encodes the specified IngestionFailureEvent message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.IngestionFailureEvent - * @static - * @param {google.pubsub.v1.IIngestionFailureEvent} message IngestionFailureEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IngestionFailureEvent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified CloudStorageFailure message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.verify|verify} messages. + * @function encode + * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + * @static + * @param {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure} message CloudStorageFailure message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudStorageFailure.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket); + if (message.objectName != null && Object.hasOwnProperty.call(message, "objectName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.objectName); + if (message.objectGeneration != null && Object.hasOwnProperty.call(message, "objectGeneration")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.objectGeneration); + if (message.avroFailureReason != null && Object.hasOwnProperty.call(message, "avroFailureReason")) + $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.encode(message.avroFailureReason, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.apiViolationReason != null && Object.hasOwnProperty.call(message, "apiViolationReason")) + $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.encode(message.apiViolationReason, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; - /** - * Decodes an IngestionFailureEvent message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.IngestionFailureEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.IngestionFailureEvent} IngestionFailureEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IngestionFailureEvent.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.topic = reader.string(); + /** + * Encodes the specified CloudStorageFailure message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.verify|verify} messages. + * @function encodeDelimited + * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + * @static + * @param {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure} message CloudStorageFailure message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudStorageFailure.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudStorageFailure message from the specified reader or buffer. + * @function decode + * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure} CloudStorageFailure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudStorageFailure.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.bucket = reader.string(); + break; + } + case 2: { + message.objectName = reader.string(); + break; + } + case 3: { + message.objectGeneration = reader.int64(); + break; + } + case 5: { + message.avroFailureReason = $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.decode(reader, reader.uint32()); + break; + } + case 6: { + message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; } - case 2: { - message.errorMessage = reader.string(); - break; + } + return message; + }; + + /** + * Decodes a CloudStorageFailure message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure} CloudStorageFailure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudStorageFailure.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudStorageFailure message. + * @function verify + * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudStorageFailure.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.bucket != null && message.hasOwnProperty("bucket")) + if (!$util.isString(message.bucket)) + return "bucket: string expected"; + if (message.objectName != null && message.hasOwnProperty("objectName")) + if (!$util.isString(message.objectName)) + return "objectName: string expected"; + if (message.objectGeneration != null && message.hasOwnProperty("objectGeneration")) + if (!$util.isInteger(message.objectGeneration) && !(message.objectGeneration && $util.isInteger(message.objectGeneration.low) && $util.isInteger(message.objectGeneration.high))) + return "objectGeneration: integer|Long expected"; + if (message.avroFailureReason != null && message.hasOwnProperty("avroFailureReason")) { + properties.reason = 1; + { + var error = $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.verify(message.avroFailureReason); + if (error) + return "avroFailureReason." + error; } - case 3: { - message.cloudStorageFailure = $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.decode(reader, reader.uint32()); - break; + } + if (message.apiViolationReason != null && message.hasOwnProperty("apiViolationReason")) { + if (properties.reason === 1) + return "reason: multiple values"; + properties.reason = 1; + { + var error = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.verify(message.apiViolationReason); + if (error) + return "apiViolationReason." + error; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; - - /** - * Decodes an IngestionFailureEvent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.IngestionFailureEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.IngestionFailureEvent} IngestionFailureEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IngestionFailureEvent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return null; + }; - /** - * Verifies an IngestionFailureEvent message. - * @function verify - * @memberof google.pubsub.v1.IngestionFailureEvent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IngestionFailureEvent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.topic != null && message.hasOwnProperty("topic")) - if (!$util.isString(message.topic)) - return "topic: string expected"; - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) - if (!$util.isString(message.errorMessage)) - return "errorMessage: string expected"; - if (message.cloudStorageFailure != null && message.hasOwnProperty("cloudStorageFailure")) { - properties.failure = 1; - { - var error = $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.verify(message.cloudStorageFailure); - if (error) - return "cloudStorageFailure." + error; + /** + * Creates a CloudStorageFailure message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + * @static + * @param {Object.} object Plain object + * @returns {google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure} CloudStorageFailure + */ + CloudStorageFailure.fromObject = function fromObject(object) { + if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) + return object; + var message = new $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure(); + if (object.bucket != null) + message.bucket = String(object.bucket); + if (object.objectName != null) + message.objectName = String(object.objectName); + if (object.objectGeneration != null) + if ($util.Long) + (message.objectGeneration = $util.Long.fromValue(object.objectGeneration)).unsigned = false; + else if (typeof object.objectGeneration === "string") + message.objectGeneration = parseInt(object.objectGeneration, 10); + else if (typeof object.objectGeneration === "number") + message.objectGeneration = object.objectGeneration; + else if (typeof object.objectGeneration === "object") + message.objectGeneration = new $util.LongBits(object.objectGeneration.low >>> 0, object.objectGeneration.high >>> 0).toNumber(); + if (object.avroFailureReason != null) { + if (typeof object.avroFailureReason !== "object") + throw TypeError(".google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.avroFailureReason: object expected"); + message.avroFailureReason = $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.fromObject(object.avroFailureReason); } - } - return null; - }; + if (object.apiViolationReason != null) { + if (typeof object.apiViolationReason !== "object") + throw TypeError(".google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.apiViolationReason: object expected"); + message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.fromObject(object.apiViolationReason); + } + return message; + }; - /** - * Creates an IngestionFailureEvent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.IngestionFailureEvent - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.IngestionFailureEvent} IngestionFailureEvent - */ - IngestionFailureEvent.fromObject = function fromObject(object) { - if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent) - return object; - var message = new $root.google.pubsub.v1.IngestionFailureEvent(); - if (object.topic != null) - message.topic = String(object.topic); - if (object.errorMessage != null) - message.errorMessage = String(object.errorMessage); - if (object.cloudStorageFailure != null) { - if (typeof object.cloudStorageFailure !== "object") - throw TypeError(".google.pubsub.v1.IngestionFailureEvent.cloudStorageFailure: object expected"); - message.cloudStorageFailure = $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.fromObject(object.cloudStorageFailure); - } - return message; - }; + /** + * Creates a plain object from a CloudStorageFailure message. Also converts values to other types if specified. + * @function toObject + * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + * @static + * @param {google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure} message CloudStorageFailure + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudStorageFailure.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.bucket = ""; + object.objectName = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.objectGeneration = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.objectGeneration = options.longs === String ? "0" : 0; + } + if (message.bucket != null && message.hasOwnProperty("bucket")) + object.bucket = message.bucket; + if (message.objectName != null && message.hasOwnProperty("objectName")) + object.objectName = message.objectName; + if (message.objectGeneration != null && message.hasOwnProperty("objectGeneration")) + if (typeof message.objectGeneration === "number") + object.objectGeneration = options.longs === String ? String(message.objectGeneration) : message.objectGeneration; + else + object.objectGeneration = options.longs === String ? $util.Long.prototype.toString.call(message.objectGeneration) : options.longs === Number ? new $util.LongBits(message.objectGeneration.low >>> 0, message.objectGeneration.high >>> 0).toNumber() : message.objectGeneration; + if (message.avroFailureReason != null && message.hasOwnProperty("avroFailureReason")) { + object.avroFailureReason = $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.toObject(message.avroFailureReason, options); + if (options.oneofs) + object.reason = "avroFailureReason"; + } + if (message.apiViolationReason != null && message.hasOwnProperty("apiViolationReason")) { + object.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.toObject(message.apiViolationReason, options); + if (options.oneofs) + object.reason = "apiViolationReason"; + } + return object; + }; - /** - * Creates a plain object from an IngestionFailureEvent message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.IngestionFailureEvent - * @static - * @param {google.pubsub.v1.IngestionFailureEvent} message IngestionFailureEvent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IngestionFailureEvent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.topic = ""; - object.errorMessage = ""; - } - if (message.topic != null && message.hasOwnProperty("topic")) - object.topic = message.topic; - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) - object.errorMessage = message.errorMessage; - if (message.cloudStorageFailure != null && message.hasOwnProperty("cloudStorageFailure")) { - object.cloudStorageFailure = $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.toObject(message.cloudStorageFailure, options); - if (options.oneofs) - object.failure = "cloudStorageFailure"; - } - return object; - }; + /** + * Converts this CloudStorageFailure to JSON. + * @function toJSON + * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + * @instance + * @returns {Object.} JSON object + */ + CloudStorageFailure.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this IngestionFailureEvent to JSON. - * @function toJSON - * @memberof google.pubsub.v1.IngestionFailureEvent - * @instance - * @returns {Object.} JSON object - */ - IngestionFailureEvent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for CloudStorageFailure + * @function getTypeUrl + * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudStorageFailure.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure"; + }; - /** - * Gets the default type url for IngestionFailureEvent - * @function getTypeUrl - * @memberof google.pubsub.v1.IngestionFailureEvent - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - IngestionFailureEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent"; - }; + return CloudStorageFailure; + })(); - IngestionFailureEvent.ApiViolationReason = (function() { + IngestionFailureEvent.AwsMskFailureReason = (function() { /** - * Properties of an ApiViolationReason. + * Properties of an AwsMskFailureReason. * @memberof google.pubsub.v1.IngestionFailureEvent - * @interface IApiViolationReason + * @interface IAwsMskFailureReason + * @property {string|null} [clusterArn] AwsMskFailureReason clusterArn + * @property {string|null} [kafkaTopic] AwsMskFailureReason kafkaTopic + * @property {number|Long|null} [partitionId] AwsMskFailureReason partitionId + * @property {number|Long|null} [offset] AwsMskFailureReason offset + * @property {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null} [apiViolationReason] AwsMskFailureReason apiViolationReason */ /** - * Constructs a new ApiViolationReason. + * Constructs a new AwsMskFailureReason. * @memberof google.pubsub.v1.IngestionFailureEvent - * @classdesc Represents an ApiViolationReason. - * @implements IApiViolationReason + * @classdesc Represents an AwsMskFailureReason. + * @implements IAwsMskFailureReason * @constructor - * @param {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason=} [properties] Properties to set + * @param {google.pubsub.v1.IngestionFailureEvent.IAwsMskFailureReason=} [properties] Properties to set */ - function ApiViolationReason(properties) { + function AwsMskFailureReason(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3160,63 +5256,147 @@ } /** - * Creates a new ApiViolationReason instance using the specified properties. + * AwsMskFailureReason clusterArn. + * @member {string} clusterArn + * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason + * @instance + */ + AwsMskFailureReason.prototype.clusterArn = ""; + + /** + * AwsMskFailureReason kafkaTopic. + * @member {string} kafkaTopic + * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason + * @instance + */ + AwsMskFailureReason.prototype.kafkaTopic = ""; + + /** + * AwsMskFailureReason partitionId. + * @member {number|Long} partitionId + * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason + * @instance + */ + AwsMskFailureReason.prototype.partitionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * AwsMskFailureReason offset. + * @member {number|Long} offset + * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason + * @instance + */ + AwsMskFailureReason.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * AwsMskFailureReason apiViolationReason. + * @member {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null|undefined} apiViolationReason + * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason + * @instance + */ + AwsMskFailureReason.prototype.apiViolationReason = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AwsMskFailureReason reason. + * @member {"apiViolationReason"|undefined} reason + * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason + * @instance + */ + Object.defineProperty(AwsMskFailureReason.prototype, "reason", { + get: $util.oneOfGetter($oneOfFields = ["apiViolationReason"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AwsMskFailureReason instance using the specified properties. * @function create - * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason + * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason * @static - * @param {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason=} [properties] Properties to set - * @returns {google.pubsub.v1.IngestionFailureEvent.ApiViolationReason} ApiViolationReason instance + * @param {google.pubsub.v1.IngestionFailureEvent.IAwsMskFailureReason=} [properties] Properties to set + * @returns {google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason} AwsMskFailureReason instance */ - ApiViolationReason.create = function create(properties) { - return new ApiViolationReason(properties); + AwsMskFailureReason.create = function create(properties) { + return new AwsMskFailureReason(properties); }; /** - * Encodes the specified ApiViolationReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.verify|verify} messages. + * Encodes the specified AwsMskFailureReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.verify|verify} messages. * @function encode - * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason + * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason * @static - * @param {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason} message ApiViolationReason message or plain object to encode + * @param {google.pubsub.v1.IngestionFailureEvent.IAwsMskFailureReason} message AwsMskFailureReason message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ApiViolationReason.encode = function encode(message, writer) { + AwsMskFailureReason.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.clusterArn != null && Object.hasOwnProperty.call(message, "clusterArn")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clusterArn); + if (message.kafkaTopic != null && Object.hasOwnProperty.call(message, "kafkaTopic")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.kafkaTopic); + if (message.partitionId != null && Object.hasOwnProperty.call(message, "partitionId")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.partitionId); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.offset); + if (message.apiViolationReason != null && Object.hasOwnProperty.call(message, "apiViolationReason")) + $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.encode(message.apiViolationReason, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified ApiViolationReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.verify|verify} messages. + * Encodes the specified AwsMskFailureReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.verify|verify} messages. * @function encodeDelimited - * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason + * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason * @static - * @param {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason} message ApiViolationReason message or plain object to encode + * @param {google.pubsub.v1.IngestionFailureEvent.IAwsMskFailureReason} message AwsMskFailureReason message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ApiViolationReason.encodeDelimited = function encodeDelimited(message, writer) { + AwsMskFailureReason.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ApiViolationReason message from the specified reader or buffer. + * Decodes an AwsMskFailureReason message from the specified reader or buffer. * @function decode - * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason + * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.IngestionFailureEvent.ApiViolationReason} ApiViolationReason + * @returns {google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason} AwsMskFailureReason * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ApiViolationReason.decode = function decode(reader, length) { + AwsMskFailureReason.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.clusterArn = reader.string(); + break; + } + case 2: { + message.kafkaTopic = reader.string(); + break; + } + case 3: { + message.partitionId = reader.int64(); + break; + } + case 4: { + message.offset = reader.int64(); + break; + } + case 5: { + message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -3226,108 +5406,198 @@ }; /** - * Decodes an ApiViolationReason message from the specified reader or buffer, length delimited. + * Decodes an AwsMskFailureReason message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason + * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.IngestionFailureEvent.ApiViolationReason} ApiViolationReason + * @returns {google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason} AwsMskFailureReason * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ApiViolationReason.decodeDelimited = function decodeDelimited(reader) { + AwsMskFailureReason.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ApiViolationReason message. + * Verifies an AwsMskFailureReason message. * @function verify - * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason + * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ApiViolationReason.verify = function verify(message) { + AwsMskFailureReason.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; + if (message.clusterArn != null && message.hasOwnProperty("clusterArn")) + if (!$util.isString(message.clusterArn)) + return "clusterArn: string expected"; + if (message.kafkaTopic != null && message.hasOwnProperty("kafkaTopic")) + if (!$util.isString(message.kafkaTopic)) + return "kafkaTopic: string expected"; + if (message.partitionId != null && message.hasOwnProperty("partitionId")) + if (!$util.isInteger(message.partitionId) && !(message.partitionId && $util.isInteger(message.partitionId.low) && $util.isInteger(message.partitionId.high))) + return "partitionId: integer|Long expected"; + if (message.offset != null && message.hasOwnProperty("offset")) + if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) + return "offset: integer|Long expected"; + if (message.apiViolationReason != null && message.hasOwnProperty("apiViolationReason")) { + properties.reason = 1; + { + var error = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.verify(message.apiViolationReason); + if (error) + return "apiViolationReason." + error; + } + } return null; }; /** - * Creates an ApiViolationReason message from a plain object. Also converts values to their respective internal types. + * Creates an AwsMskFailureReason message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason + * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason * @static * @param {Object.} object Plain object - * @returns {google.pubsub.v1.IngestionFailureEvent.ApiViolationReason} ApiViolationReason + * @returns {google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason} AwsMskFailureReason */ - ApiViolationReason.fromObject = function fromObject(object) { - if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) + AwsMskFailureReason.fromObject = function fromObject(object) { + if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason) return object; - return new $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason(); + var message = new $root.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason(); + if (object.clusterArn != null) + message.clusterArn = String(object.clusterArn); + if (object.kafkaTopic != null) + message.kafkaTopic = String(object.kafkaTopic); + if (object.partitionId != null) + if ($util.Long) + (message.partitionId = $util.Long.fromValue(object.partitionId)).unsigned = false; + else if (typeof object.partitionId === "string") + message.partitionId = parseInt(object.partitionId, 10); + else if (typeof object.partitionId === "number") + message.partitionId = object.partitionId; + else if (typeof object.partitionId === "object") + message.partitionId = new $util.LongBits(object.partitionId.low >>> 0, object.partitionId.high >>> 0).toNumber(); + if (object.offset != null) + if ($util.Long) + (message.offset = $util.Long.fromValue(object.offset)).unsigned = false; + else if (typeof object.offset === "string") + message.offset = parseInt(object.offset, 10); + else if (typeof object.offset === "number") + message.offset = object.offset; + else if (typeof object.offset === "object") + message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); + if (object.apiViolationReason != null) { + if (typeof object.apiViolationReason !== "object") + throw TypeError(".google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.apiViolationReason: object expected"); + message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.fromObject(object.apiViolationReason); + } + return message; }; /** - * Creates a plain object from an ApiViolationReason message. Also converts values to other types if specified. + * Creates a plain object from an AwsMskFailureReason message. Also converts values to other types if specified. * @function toObject - * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason + * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason * @static - * @param {google.pubsub.v1.IngestionFailureEvent.ApiViolationReason} message ApiViolationReason + * @param {google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason} message AwsMskFailureReason * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ApiViolationReason.toObject = function toObject() { - return {}; + AwsMskFailureReason.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.clusterArn = ""; + object.kafkaTopic = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.partitionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.partitionId = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.offset = options.longs === String ? "0" : 0; + } + if (message.clusterArn != null && message.hasOwnProperty("clusterArn")) + object.clusterArn = message.clusterArn; + if (message.kafkaTopic != null && message.hasOwnProperty("kafkaTopic")) + object.kafkaTopic = message.kafkaTopic; + if (message.partitionId != null && message.hasOwnProperty("partitionId")) + if (typeof message.partitionId === "number") + object.partitionId = options.longs === String ? String(message.partitionId) : message.partitionId; + else + object.partitionId = options.longs === String ? $util.Long.prototype.toString.call(message.partitionId) : options.longs === Number ? new $util.LongBits(message.partitionId.low >>> 0, message.partitionId.high >>> 0).toNumber() : message.partitionId; + if (message.offset != null && message.hasOwnProperty("offset")) + if (typeof message.offset === "number") + object.offset = options.longs === String ? String(message.offset) : message.offset; + else + object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; + if (message.apiViolationReason != null && message.hasOwnProperty("apiViolationReason")) { + object.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.toObject(message.apiViolationReason, options); + if (options.oneofs) + object.reason = "apiViolationReason"; + } + return object; }; /** - * Converts this ApiViolationReason to JSON. + * Converts this AwsMskFailureReason to JSON. * @function toJSON - * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason + * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason * @instance * @returns {Object.} JSON object */ - ApiViolationReason.prototype.toJSON = function toJSON() { + AwsMskFailureReason.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ApiViolationReason + * Gets the default type url for AwsMskFailureReason * @function getTypeUrl - * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason + * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ApiViolationReason.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AwsMskFailureReason.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent.ApiViolationReason"; + return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason"; }; - return ApiViolationReason; + return AwsMskFailureReason; })(); - IngestionFailureEvent.AvroFailureReason = (function() { + IngestionFailureEvent.AzureEventHubsFailureReason = (function() { /** - * Properties of an AvroFailureReason. + * Properties of an AzureEventHubsFailureReason. * @memberof google.pubsub.v1.IngestionFailureEvent - * @interface IAvroFailureReason + * @interface IAzureEventHubsFailureReason + * @property {string|null} [namespace] AzureEventHubsFailureReason namespace + * @property {string|null} [eventHub] AzureEventHubsFailureReason eventHub + * @property {number|Long|null} [partitionId] AzureEventHubsFailureReason partitionId + * @property {number|Long|null} [offset] AzureEventHubsFailureReason offset + * @property {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null} [apiViolationReason] AzureEventHubsFailureReason apiViolationReason */ /** - * Constructs a new AvroFailureReason. + * Constructs a new AzureEventHubsFailureReason. * @memberof google.pubsub.v1.IngestionFailureEvent - * @classdesc Represents an AvroFailureReason. - * @implements IAvroFailureReason + * @classdesc Represents an AzureEventHubsFailureReason. + * @implements IAzureEventHubsFailureReason * @constructor - * @param {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason=} [properties] Properties to set + * @param {google.pubsub.v1.IngestionFailureEvent.IAzureEventHubsFailureReason=} [properties] Properties to set */ - function AvroFailureReason(properties) { + function AzureEventHubsFailureReason(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3335,63 +5605,147 @@ } /** - * Creates a new AvroFailureReason instance using the specified properties. + * AzureEventHubsFailureReason namespace. + * @member {string} namespace + * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason + * @instance + */ + AzureEventHubsFailureReason.prototype.namespace = ""; + + /** + * AzureEventHubsFailureReason eventHub. + * @member {string} eventHub + * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason + * @instance + */ + AzureEventHubsFailureReason.prototype.eventHub = ""; + + /** + * AzureEventHubsFailureReason partitionId. + * @member {number|Long} partitionId + * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason + * @instance + */ + AzureEventHubsFailureReason.prototype.partitionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * AzureEventHubsFailureReason offset. + * @member {number|Long} offset + * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason + * @instance + */ + AzureEventHubsFailureReason.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * AzureEventHubsFailureReason apiViolationReason. + * @member {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null|undefined} apiViolationReason + * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason + * @instance + */ + AzureEventHubsFailureReason.prototype.apiViolationReason = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AzureEventHubsFailureReason reason. + * @member {"apiViolationReason"|undefined} reason + * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason + * @instance + */ + Object.defineProperty(AzureEventHubsFailureReason.prototype, "reason", { + get: $util.oneOfGetter($oneOfFields = ["apiViolationReason"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AzureEventHubsFailureReason instance using the specified properties. * @function create - * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason + * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason * @static - * @param {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason=} [properties] Properties to set - * @returns {google.pubsub.v1.IngestionFailureEvent.AvroFailureReason} AvroFailureReason instance + * @param {google.pubsub.v1.IngestionFailureEvent.IAzureEventHubsFailureReason=} [properties] Properties to set + * @returns {google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason} AzureEventHubsFailureReason instance */ - AvroFailureReason.create = function create(properties) { - return new AvroFailureReason(properties); + AzureEventHubsFailureReason.create = function create(properties) { + return new AzureEventHubsFailureReason(properties); }; /** - * Encodes the specified AvroFailureReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.verify|verify} messages. + * Encodes the specified AzureEventHubsFailureReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.verify|verify} messages. * @function encode - * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason + * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason * @static - * @param {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason} message AvroFailureReason message or plain object to encode + * @param {google.pubsub.v1.IngestionFailureEvent.IAzureEventHubsFailureReason} message AzureEventHubsFailureReason message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AvroFailureReason.encode = function encode(message, writer) { + AzureEventHubsFailureReason.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.namespace != null && Object.hasOwnProperty.call(message, "namespace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namespace); + if (message.eventHub != null && Object.hasOwnProperty.call(message, "eventHub")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.eventHub); + if (message.partitionId != null && Object.hasOwnProperty.call(message, "partitionId")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.partitionId); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.offset); + if (message.apiViolationReason != null && Object.hasOwnProperty.call(message, "apiViolationReason")) + $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.encode(message.apiViolationReason, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified AvroFailureReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.verify|verify} messages. + * Encodes the specified AzureEventHubsFailureReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.verify|verify} messages. * @function encodeDelimited - * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason + * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason * @static - * @param {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason} message AvroFailureReason message or plain object to encode + * @param {google.pubsub.v1.IngestionFailureEvent.IAzureEventHubsFailureReason} message AzureEventHubsFailureReason message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AvroFailureReason.encodeDelimited = function encodeDelimited(message, writer) { + AzureEventHubsFailureReason.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AvroFailureReason message from the specified reader or buffer. + * Decodes an AzureEventHubsFailureReason message from the specified reader or buffer. * @function decode - * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason + * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.IngestionFailureEvent.AvroFailureReason} AvroFailureReason + * @returns {google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason} AzureEventHubsFailureReason * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AvroFailureReason.decode = function decode(reader, length) { + AzureEventHubsFailureReason.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.namespace = reader.string(); + break; + } + case 2: { + message.eventHub = reader.string(); + break; + } + case 3: { + message.partitionId = reader.int64(); + break; + } + case 4: { + message.offset = reader.int64(); + break; + } + case 5: { + message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -3401,113 +5755,198 @@ }; /** - * Decodes an AvroFailureReason message from the specified reader or buffer, length delimited. + * Decodes an AzureEventHubsFailureReason message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason + * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.IngestionFailureEvent.AvroFailureReason} AvroFailureReason + * @returns {google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason} AzureEventHubsFailureReason * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AvroFailureReason.decodeDelimited = function decodeDelimited(reader) { + AzureEventHubsFailureReason.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AvroFailureReason message. + * Verifies an AzureEventHubsFailureReason message. * @function verify - * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason + * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AvroFailureReason.verify = function verify(message) { + AzureEventHubsFailureReason.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; + if (message.namespace != null && message.hasOwnProperty("namespace")) + if (!$util.isString(message.namespace)) + return "namespace: string expected"; + if (message.eventHub != null && message.hasOwnProperty("eventHub")) + if (!$util.isString(message.eventHub)) + return "eventHub: string expected"; + if (message.partitionId != null && message.hasOwnProperty("partitionId")) + if (!$util.isInteger(message.partitionId) && !(message.partitionId && $util.isInteger(message.partitionId.low) && $util.isInteger(message.partitionId.high))) + return "partitionId: integer|Long expected"; + if (message.offset != null && message.hasOwnProperty("offset")) + if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) + return "offset: integer|Long expected"; + if (message.apiViolationReason != null && message.hasOwnProperty("apiViolationReason")) { + properties.reason = 1; + { + var error = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.verify(message.apiViolationReason); + if (error) + return "apiViolationReason." + error; + } + } return null; }; /** - * Creates an AvroFailureReason message from a plain object. Also converts values to their respective internal types. + * Creates an AzureEventHubsFailureReason message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason + * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason * @static * @param {Object.} object Plain object - * @returns {google.pubsub.v1.IngestionFailureEvent.AvroFailureReason} AvroFailureReason + * @returns {google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason} AzureEventHubsFailureReason */ - AvroFailureReason.fromObject = function fromObject(object) { - if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason) + AzureEventHubsFailureReason.fromObject = function fromObject(object) { + if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason) return object; - return new $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason(); + var message = new $root.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason(); + if (object.namespace != null) + message.namespace = String(object.namespace); + if (object.eventHub != null) + message.eventHub = String(object.eventHub); + if (object.partitionId != null) + if ($util.Long) + (message.partitionId = $util.Long.fromValue(object.partitionId)).unsigned = false; + else if (typeof object.partitionId === "string") + message.partitionId = parseInt(object.partitionId, 10); + else if (typeof object.partitionId === "number") + message.partitionId = object.partitionId; + else if (typeof object.partitionId === "object") + message.partitionId = new $util.LongBits(object.partitionId.low >>> 0, object.partitionId.high >>> 0).toNumber(); + if (object.offset != null) + if ($util.Long) + (message.offset = $util.Long.fromValue(object.offset)).unsigned = false; + else if (typeof object.offset === "string") + message.offset = parseInt(object.offset, 10); + else if (typeof object.offset === "number") + message.offset = object.offset; + else if (typeof object.offset === "object") + message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); + if (object.apiViolationReason != null) { + if (typeof object.apiViolationReason !== "object") + throw TypeError(".google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.apiViolationReason: object expected"); + message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.fromObject(object.apiViolationReason); + } + return message; }; /** - * Creates a plain object from an AvroFailureReason message. Also converts values to other types if specified. + * Creates a plain object from an AzureEventHubsFailureReason message. Also converts values to other types if specified. * @function toObject - * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason + * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason * @static - * @param {google.pubsub.v1.IngestionFailureEvent.AvroFailureReason} message AvroFailureReason + * @param {google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason} message AzureEventHubsFailureReason * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AvroFailureReason.toObject = function toObject() { - return {}; + AzureEventHubsFailureReason.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namespace = ""; + object.eventHub = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.partitionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.partitionId = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.offset = options.longs === String ? "0" : 0; + } + if (message.namespace != null && message.hasOwnProperty("namespace")) + object.namespace = message.namespace; + if (message.eventHub != null && message.hasOwnProperty("eventHub")) + object.eventHub = message.eventHub; + if (message.partitionId != null && message.hasOwnProperty("partitionId")) + if (typeof message.partitionId === "number") + object.partitionId = options.longs === String ? String(message.partitionId) : message.partitionId; + else + object.partitionId = options.longs === String ? $util.Long.prototype.toString.call(message.partitionId) : options.longs === Number ? new $util.LongBits(message.partitionId.low >>> 0, message.partitionId.high >>> 0).toNumber() : message.partitionId; + if (message.offset != null && message.hasOwnProperty("offset")) + if (typeof message.offset === "number") + object.offset = options.longs === String ? String(message.offset) : message.offset; + else + object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; + if (message.apiViolationReason != null && message.hasOwnProperty("apiViolationReason")) { + object.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.toObject(message.apiViolationReason, options); + if (options.oneofs) + object.reason = "apiViolationReason"; + } + return object; }; /** - * Converts this AvroFailureReason to JSON. + * Converts this AzureEventHubsFailureReason to JSON. * @function toJSON - * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason + * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason * @instance * @returns {Object.} JSON object */ - AvroFailureReason.prototype.toJSON = function toJSON() { + AzureEventHubsFailureReason.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AvroFailureReason + * Gets the default type url for AzureEventHubsFailureReason * @function getTypeUrl - * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason + * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AvroFailureReason.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AzureEventHubsFailureReason.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent.AvroFailureReason"; + return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason"; }; - return AvroFailureReason; + return AzureEventHubsFailureReason; })(); - IngestionFailureEvent.CloudStorageFailure = (function() { + IngestionFailureEvent.ConfluentCloudFailureReason = (function() { /** - * Properties of a CloudStorageFailure. + * Properties of a ConfluentCloudFailureReason. * @memberof google.pubsub.v1.IngestionFailureEvent - * @interface ICloudStorageFailure - * @property {string|null} [bucket] CloudStorageFailure bucket - * @property {string|null} [objectName] CloudStorageFailure objectName - * @property {number|Long|null} [objectGeneration] CloudStorageFailure objectGeneration - * @property {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason|null} [avroFailureReason] CloudStorageFailure avroFailureReason - * @property {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null} [apiViolationReason] CloudStorageFailure apiViolationReason + * @interface IConfluentCloudFailureReason + * @property {string|null} [clusterId] ConfluentCloudFailureReason clusterId + * @property {string|null} [kafkaTopic] ConfluentCloudFailureReason kafkaTopic + * @property {number|Long|null} [partitionId] ConfluentCloudFailureReason partitionId + * @property {number|Long|null} [offset] ConfluentCloudFailureReason offset + * @property {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null} [apiViolationReason] ConfluentCloudFailureReason apiViolationReason */ /** - * Constructs a new CloudStorageFailure. + * Constructs a new ConfluentCloudFailureReason. * @memberof google.pubsub.v1.IngestionFailureEvent - * @classdesc Represents a CloudStorageFailure. - * @implements ICloudStorageFailure + * @classdesc Represents a ConfluentCloudFailureReason. + * @implements IConfluentCloudFailureReason * @constructor - * @param {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure=} [properties] Properties to set + * @param {google.pubsub.v1.IngestionFailureEvent.IConfluentCloudFailureReason=} [properties] Properties to set */ - function CloudStorageFailure(properties) { + function ConfluentCloudFailureReason(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3515,144 +5954,144 @@ } /** - * CloudStorageFailure bucket. - * @member {string} bucket - * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + * ConfluentCloudFailureReason clusterId. + * @member {string} clusterId + * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason * @instance */ - CloudStorageFailure.prototype.bucket = ""; + ConfluentCloudFailureReason.prototype.clusterId = ""; /** - * CloudStorageFailure objectName. - * @member {string} objectName - * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + * ConfluentCloudFailureReason kafkaTopic. + * @member {string} kafkaTopic + * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason * @instance */ - CloudStorageFailure.prototype.objectName = ""; + ConfluentCloudFailureReason.prototype.kafkaTopic = ""; /** - * CloudStorageFailure objectGeneration. - * @member {number|Long} objectGeneration - * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + * ConfluentCloudFailureReason partitionId. + * @member {number|Long} partitionId + * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason * @instance */ - CloudStorageFailure.prototype.objectGeneration = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ConfluentCloudFailureReason.prototype.partitionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * CloudStorageFailure avroFailureReason. - * @member {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason|null|undefined} avroFailureReason - * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + * ConfluentCloudFailureReason offset. + * @member {number|Long} offset + * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason * @instance */ - CloudStorageFailure.prototype.avroFailureReason = null; + ConfluentCloudFailureReason.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * CloudStorageFailure apiViolationReason. + * ConfluentCloudFailureReason apiViolationReason. * @member {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null|undefined} apiViolationReason - * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason * @instance */ - CloudStorageFailure.prototype.apiViolationReason = null; + ConfluentCloudFailureReason.prototype.apiViolationReason = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * CloudStorageFailure reason. - * @member {"avroFailureReason"|"apiViolationReason"|undefined} reason - * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + * ConfluentCloudFailureReason reason. + * @member {"apiViolationReason"|undefined} reason + * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason * @instance */ - Object.defineProperty(CloudStorageFailure.prototype, "reason", { - get: $util.oneOfGetter($oneOfFields = ["avroFailureReason", "apiViolationReason"]), + Object.defineProperty(ConfluentCloudFailureReason.prototype, "reason", { + get: $util.oneOfGetter($oneOfFields = ["apiViolationReason"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new CloudStorageFailure instance using the specified properties. + * Creates a new ConfluentCloudFailureReason instance using the specified properties. * @function create - * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason * @static - * @param {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure=} [properties] Properties to set - * @returns {google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure} CloudStorageFailure instance + * @param {google.pubsub.v1.IngestionFailureEvent.IConfluentCloudFailureReason=} [properties] Properties to set + * @returns {google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason} ConfluentCloudFailureReason instance */ - CloudStorageFailure.create = function create(properties) { - return new CloudStorageFailure(properties); + ConfluentCloudFailureReason.create = function create(properties) { + return new ConfluentCloudFailureReason(properties); }; /** - * Encodes the specified CloudStorageFailure message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.verify|verify} messages. + * Encodes the specified ConfluentCloudFailureReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.verify|verify} messages. * @function encode - * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason * @static - * @param {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure} message CloudStorageFailure message or plain object to encode + * @param {google.pubsub.v1.IngestionFailureEvent.IConfluentCloudFailureReason} message ConfluentCloudFailureReason message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudStorageFailure.encode = function encode(message, writer) { + ConfluentCloudFailureReason.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket); - if (message.objectName != null && Object.hasOwnProperty.call(message, "objectName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.objectName); - if (message.objectGeneration != null && Object.hasOwnProperty.call(message, "objectGeneration")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.objectGeneration); - if (message.avroFailureReason != null && Object.hasOwnProperty.call(message, "avroFailureReason")) - $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.encode(message.avroFailureReason, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clusterId); + if (message.kafkaTopic != null && Object.hasOwnProperty.call(message, "kafkaTopic")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.kafkaTopic); + if (message.partitionId != null && Object.hasOwnProperty.call(message, "partitionId")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.partitionId); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.offset); if (message.apiViolationReason != null && Object.hasOwnProperty.call(message, "apiViolationReason")) - $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.encode(message.apiViolationReason, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.encode(message.apiViolationReason, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified CloudStorageFailure message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.verify|verify} messages. + * Encodes the specified ConfluentCloudFailureReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.verify|verify} messages. * @function encodeDelimited - * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason * @static - * @param {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure} message CloudStorageFailure message or plain object to encode + * @param {google.pubsub.v1.IngestionFailureEvent.IConfluentCloudFailureReason} message ConfluentCloudFailureReason message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudStorageFailure.encodeDelimited = function encodeDelimited(message, writer) { + ConfluentCloudFailureReason.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CloudStorageFailure message from the specified reader or buffer. + * Decodes a ConfluentCloudFailureReason message from the specified reader or buffer. * @function decode - * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure} CloudStorageFailure + * @returns {google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason} ConfluentCloudFailureReason * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudStorageFailure.decode = function decode(reader, length) { + ConfluentCloudFailureReason.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.bucket = reader.string(); + message.clusterId = reader.string(); break; } case 2: { - message.objectName = reader.string(); + message.kafkaTopic = reader.string(); break; } case 3: { - message.objectGeneration = reader.int64(); + message.partitionId = reader.int64(); break; } - case 5: { - message.avroFailureReason = $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.decode(reader, reader.uint32()); + case 4: { + message.offset = reader.int64(); break; } - case 6: { + case 5: { message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.decode(reader, reader.uint32()); break; } @@ -3665,53 +6104,46 @@ }; /** - * Decodes a CloudStorageFailure message from the specified reader or buffer, length delimited. + * Decodes a ConfluentCloudFailureReason message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure} CloudStorageFailure + * @returns {google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason} ConfluentCloudFailureReason * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudStorageFailure.decodeDelimited = function decodeDelimited(reader) { + ConfluentCloudFailureReason.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CloudStorageFailure message. + * Verifies a ConfluentCloudFailureReason message. * @function verify - * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CloudStorageFailure.verify = function verify(message) { + ConfluentCloudFailureReason.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.bucket != null && message.hasOwnProperty("bucket")) - if (!$util.isString(message.bucket)) - return "bucket: string expected"; - if (message.objectName != null && message.hasOwnProperty("objectName")) - if (!$util.isString(message.objectName)) - return "objectName: string expected"; - if (message.objectGeneration != null && message.hasOwnProperty("objectGeneration")) - if (!$util.isInteger(message.objectGeneration) && !(message.objectGeneration && $util.isInteger(message.objectGeneration.low) && $util.isInteger(message.objectGeneration.high))) - return "objectGeneration: integer|Long expected"; - if (message.avroFailureReason != null && message.hasOwnProperty("avroFailureReason")) { - properties.reason = 1; - { - var error = $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.verify(message.avroFailureReason); - if (error) - return "avroFailureReason." + error; - } - } + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.kafkaTopic != null && message.hasOwnProperty("kafkaTopic")) + if (!$util.isString(message.kafkaTopic)) + return "kafkaTopic: string expected"; + if (message.partitionId != null && message.hasOwnProperty("partitionId")) + if (!$util.isInteger(message.partitionId) && !(message.partitionId && $util.isInteger(message.partitionId.low) && $util.isInteger(message.partitionId.high))) + return "partitionId: integer|Long expected"; + if (message.offset != null && message.hasOwnProperty("offset")) + if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) + return "offset: integer|Long expected"; if (message.apiViolationReason != null && message.hasOwnProperty("apiViolationReason")) { - if (properties.reason === 1) - return "reason: multiple values"; properties.reason = 1; { var error = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.verify(message.apiViolationReason); @@ -3723,79 +6155,88 @@ }; /** - * Creates a CloudStorageFailure message from a plain object. Also converts values to their respective internal types. + * Creates a ConfluentCloudFailureReason message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason * @static * @param {Object.} object Plain object - * @returns {google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure} CloudStorageFailure + * @returns {google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason} ConfluentCloudFailureReason */ - CloudStorageFailure.fromObject = function fromObject(object) { - if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) + ConfluentCloudFailureReason.fromObject = function fromObject(object) { + if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason) return object; - var message = new $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure(); - if (object.bucket != null) - message.bucket = String(object.bucket); - if (object.objectName != null) - message.objectName = String(object.objectName); - if (object.objectGeneration != null) + var message = new $root.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason(); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.kafkaTopic != null) + message.kafkaTopic = String(object.kafkaTopic); + if (object.partitionId != null) if ($util.Long) - (message.objectGeneration = $util.Long.fromValue(object.objectGeneration)).unsigned = false; - else if (typeof object.objectGeneration === "string") - message.objectGeneration = parseInt(object.objectGeneration, 10); - else if (typeof object.objectGeneration === "number") - message.objectGeneration = object.objectGeneration; - else if (typeof object.objectGeneration === "object") - message.objectGeneration = new $util.LongBits(object.objectGeneration.low >>> 0, object.objectGeneration.high >>> 0).toNumber(); - if (object.avroFailureReason != null) { - if (typeof object.avroFailureReason !== "object") - throw TypeError(".google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.avroFailureReason: object expected"); - message.avroFailureReason = $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.fromObject(object.avroFailureReason); - } + (message.partitionId = $util.Long.fromValue(object.partitionId)).unsigned = false; + else if (typeof object.partitionId === "string") + message.partitionId = parseInt(object.partitionId, 10); + else if (typeof object.partitionId === "number") + message.partitionId = object.partitionId; + else if (typeof object.partitionId === "object") + message.partitionId = new $util.LongBits(object.partitionId.low >>> 0, object.partitionId.high >>> 0).toNumber(); + if (object.offset != null) + if ($util.Long) + (message.offset = $util.Long.fromValue(object.offset)).unsigned = false; + else if (typeof object.offset === "string") + message.offset = parseInt(object.offset, 10); + else if (typeof object.offset === "number") + message.offset = object.offset; + else if (typeof object.offset === "object") + message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); if (object.apiViolationReason != null) { if (typeof object.apiViolationReason !== "object") - throw TypeError(".google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.apiViolationReason: object expected"); + throw TypeError(".google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.apiViolationReason: object expected"); message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.fromObject(object.apiViolationReason); } return message; }; /** - * Creates a plain object from a CloudStorageFailure message. Also converts values to other types if specified. + * Creates a plain object from a ConfluentCloudFailureReason message. Also converts values to other types if specified. * @function toObject - * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason * @static - * @param {google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure} message CloudStorageFailure + * @param {google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason} message ConfluentCloudFailureReason * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CloudStorageFailure.toObject = function toObject(message, options) { + ConfluentCloudFailureReason.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.bucket = ""; - object.objectName = ""; + object.clusterId = ""; + object.kafkaTopic = ""; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.objectGeneration = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.partitionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.objectGeneration = options.longs === String ? "0" : 0; - } - if (message.bucket != null && message.hasOwnProperty("bucket")) - object.bucket = message.bucket; - if (message.objectName != null && message.hasOwnProperty("objectName")) - object.objectName = message.objectName; - if (message.objectGeneration != null && message.hasOwnProperty("objectGeneration")) - if (typeof message.objectGeneration === "number") - object.objectGeneration = options.longs === String ? String(message.objectGeneration) : message.objectGeneration; + object.partitionId = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.offset = options.longs === String ? "0" : 0; + } + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.kafkaTopic != null && message.hasOwnProperty("kafkaTopic")) + object.kafkaTopic = message.kafkaTopic; + if (message.partitionId != null && message.hasOwnProperty("partitionId")) + if (typeof message.partitionId === "number") + object.partitionId = options.longs === String ? String(message.partitionId) : message.partitionId; else - object.objectGeneration = options.longs === String ? $util.Long.prototype.toString.call(message.objectGeneration) : options.longs === Number ? new $util.LongBits(message.objectGeneration.low >>> 0, message.objectGeneration.high >>> 0).toNumber() : message.objectGeneration; - if (message.avroFailureReason != null && message.hasOwnProperty("avroFailureReason")) { - object.avroFailureReason = $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.toObject(message.avroFailureReason, options); - if (options.oneofs) - object.reason = "avroFailureReason"; - } + object.partitionId = options.longs === String ? $util.Long.prototype.toString.call(message.partitionId) : options.longs === Number ? new $util.LongBits(message.partitionId.low >>> 0, message.partitionId.high >>> 0).toNumber() : message.partitionId; + if (message.offset != null && message.hasOwnProperty("offset")) + if (typeof message.offset === "number") + object.offset = options.longs === String ? String(message.offset) : message.offset; + else + object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; if (message.apiViolationReason != null && message.hasOwnProperty("apiViolationReason")) { object.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.toObject(message.apiViolationReason, options); if (options.oneofs) @@ -3805,32 +6246,32 @@ }; /** - * Converts this CloudStorageFailure to JSON. + * Converts this ConfluentCloudFailureReason to JSON. * @function toJSON - * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason * @instance * @returns {Object.} JSON object */ - CloudStorageFailure.prototype.toJSON = function toJSON() { + ConfluentCloudFailureReason.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CloudStorageFailure + * Gets the default type url for ConfluentCloudFailureReason * @function getTypeUrl - * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure + * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CloudStorageFailure.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ConfluentCloudFailureReason.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure"; + return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason"; }; - return CloudStorageFailure; + return ConfluentCloudFailureReason; })(); return IngestionFailureEvent; diff --git a/protos/protos.json b/protos/protos.json index a72a72967..2771ea3bb 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -248,7 +248,10 @@ "source": { "oneof": [ "awsKinesis", - "cloudStorage" + "cloudStorage", + "azureEventHubs", + "awsMsk", + "confluentCloud" ] } }, @@ -267,6 +270,27 @@ "(google.api.field_behavior)": "OPTIONAL" } }, + "azureEventHubs": { + "type": "AzureEventHubs", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "awsMsk": { + "type": "AwsMsk", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "confluentCloud": { + "type": "ConfluentCloud", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "platformLogsSettings": { "type": "PlatformLogsSettings", "id": 4, @@ -425,6 +449,190 @@ "fields": {} } } + }, + "AzureEventHubs": { + "fields": { + "state": { + "type": "State", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "resourceGroup": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "namespace": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "eventHub": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "clientId": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "tenantId": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "subscriptionId": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "gcpServiceAccount": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "EVENT_HUBS_PERMISSION_DENIED": 2, + "PUBLISH_PERMISSION_DENIED": 3, + "NAMESPACE_NOT_FOUND": 4, + "EVENT_HUB_NOT_FOUND": 5, + "SUBSCRIPTION_NOT_FOUND": 6, + "RESOURCE_GROUP_NOT_FOUND": 7 + } + } + } + }, + "AwsMsk": { + "fields": { + "state": { + "type": "State", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "clusterArn": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "topic": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "awsRoleArn": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "gcpServiceAccount": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "MSK_PERMISSION_DENIED": 2, + "PUBLISH_PERMISSION_DENIED": 3, + "CLUSTER_NOT_FOUND": 4, + "TOPIC_NOT_FOUND": 5 + } + } + } + }, + "ConfluentCloud": { + "fields": { + "state": { + "type": "State", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "bootstrapServer": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "topic": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "identityPoolId": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "gcpServiceAccount": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "CONFLUENT_CLOUD_PERMISSION_DENIED": 2, + "PUBLISH_PERMISSION_DENIED": 3, + "UNREACHABLE_BOOTSTRAP_SERVER": 4, + "CLUSTER_NOT_FOUND": 5, + "TOPIC_NOT_FOUND": 6 + } + } + } } } }, @@ -455,7 +663,10 @@ "oneofs": { "failure": { "oneof": [ - "cloudStorageFailure" + "cloudStorageFailure", + "awsMskFailure", + "azureEventHubsFailure", + "confluentCloudFailure" ] } }, @@ -480,6 +691,27 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "awsMskFailure": { + "type": "AwsMskFailureReason", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "azureEventHubsFailure": { + "type": "AzureEventHubsFailureReason", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "confluentCloudFailure": { + "type": "ConfluentCloudFailureReason", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -535,6 +767,144 @@ } } } + }, + "AwsMskFailureReason": { + "oneofs": { + "reason": { + "oneof": [ + "apiViolationReason" + ] + } + }, + "fields": { + "clusterArn": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "kafkaTopic": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "partitionId": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "offset": { + "type": "int64", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "apiViolationReason": { + "type": "ApiViolationReason", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AzureEventHubsFailureReason": { + "oneofs": { + "reason": { + "oneof": [ + "apiViolationReason" + ] + } + }, + "fields": { + "namespace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "eventHub": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "partitionId": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "offset": { + "type": "int64", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "apiViolationReason": { + "type": "ApiViolationReason", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ConfluentCloudFailureReason": { + "oneofs": { + "reason": { + "oneof": [ + "apiViolationReason" + ] + } + }, + "fields": { + "clusterId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "kafkaTopic": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "partitionId": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "offset": { + "type": "int64", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "apiViolationReason": { + "type": "ApiViolationReason", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } } } }, diff --git a/src/v1/index.ts b/src/v1/index.ts index f12ac87b4..6131eef99 100644 --- a/src/v1/index.ts +++ b/src/v1/index.ts @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/v1/publisher_client.ts b/src/v1/publisher_client.ts index d281e1f0e..f8ce9d942 100644 --- a/src/v1/publisher_client.ts +++ b/src/v1/publisher_client.ts @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/v1/schema_service_client.ts b/src/v1/schema_service_client.ts index 068b0a247..d94d5a8e9 100644 --- a/src/v1/schema_service_client.ts +++ b/src/v1/schema_service_client.ts @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/v1/subscriber_client.ts b/src/v1/subscriber_client.ts index 9daf16f61..26c6d9053 100644 --- a/src/v1/subscriber_client.ts +++ b/src/v1/subscriber_client.ts @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/test/gapic_publisher_v1.ts b/test/gapic_publisher_v1.ts index 8a15356f1..07023b4cd 100644 --- a/test/gapic_publisher_v1.ts +++ b/test/gapic_publisher_v1.ts @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/test/gapic_schema_service_v1.ts b/test/gapic_schema_service_v1.ts index 0f29cc7e1..a01b05f34 100644 --- a/test/gapic_schema_service_v1.ts +++ b/test/gapic_schema_service_v1.ts @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/test/gapic_subscriber_v1.ts b/test/gapic_subscriber_v1.ts index 7a8a738d2..92c5fc49a 100644 --- a/test/gapic_subscriber_v1.ts +++ b/test/gapic_subscriber_v1.ts @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License.