diff --git a/owl-bot-staging/v1/protos/google/pubsub/v1/pubsub.proto b/owl-bot-staging/v1/protos/google/pubsub/v1/pubsub.proto index a9934d03f..54b44b822 100644 --- a/owl-bot-staging/v1/protos/google/pubsub/v1/pubsub.proto +++ b/owl-bot-staging/v1/protos/google/pubsub/v1/pubsub.proto @@ -237,11 +237,132 @@ message IngestionDataSourceSettings { string gcp_service_account = 5 [(google.api.field_behavior) = REQUIRED]; } + // Ingestion settings for Cloud Storage. + message CloudStorage { + // Possible states for ingestion from Cloud Storage. + enum State { + // Default value. This value is unused. + STATE_UNSPECIFIED = 0; + + // Ingestion is active. + ACTIVE = 1; + + // Permission denied encountered while calling the Cloud Storage API. This + // can happen if the Pub/Sub SA has not been granted the + // [appropriate + // permissions](https://cloud.google.com/storage/docs/access-control/iam-permissions): + // - storage.objects.list: to list the objects in a bucket. + // - storage.objects.get: to read the objects in a bucket. + // - storage.buckets.get: to verify the bucket exists. + CLOUD_STORAGE_PERMISSION_DENIED = 2; + + // Permission denied encountered while publishing to the topic. This can + // happen if the Pub/Sub SA has not been granted the [appropriate publish + // permissions](https://cloud.google.com/pubsub/docs/access-control#pubsub.publisher) + PUBLISH_PERMISSION_DENIED = 3; + + // The provided Cloud Storage bucket doesn't exist. + BUCKET_NOT_FOUND = 4; + + // The Cloud Storage bucket has too many objects, ingestion will be + // paused. + TOO_MANY_OBJECTS = 5; + } + + // Configuration for reading Cloud Storage data in text format. Each line of + // text as specified by the delimiter will be set to the `data` field of a + // Pub/Sub message. + message TextFormat { + // Optional. When unset, '\n' is used. + optional string delimiter = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // Configuration for reading Cloud Storage data in Avro binary format. The + // bytes of each object will be set to the `data` field of a Pub/Sub + // message. + message AvroFormat {} + + // Configuration for reading Cloud Storage data written via [Cloud Storage + // subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage). The + // data and attributes fields of the originally exported Pub/Sub message + // will be restored when publishing. + message PubSubAvroFormat {} + + // Output only. An output-only field that indicates the state of the Cloud + // Storage ingestion source. + State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Cloud Storage bucket. The bucket name must be without any + // prefix like "gs://". See the [bucket naming requirements] + // (https://cloud.google.com/storage/docs/buckets#naming). + string bucket = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Defaults to text format. + oneof input_format { + // Optional. Data from Cloud Storage will be interpreted as text. + TextFormat text_format = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Data from Cloud Storage will be interpreted in Avro format. + AvroFormat avro_format = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. It will be assumed data from Cloud Storage was written via + // [Cloud Storage + // subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage). + PubSubAvroFormat pubsub_avro_format = 5 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Only objects with a larger or equal creation timestamp will be + // ingested. + google.protobuf.Timestamp minimum_object_create_time = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Glob pattern used to match objects that will be ingested. If + // unset, all objects will be ingested. See the [supported + // patterns](https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob). + string match_glob = 9 [(google.api.field_behavior) = OPTIONAL]; + } + // Only one source type can have settings set. oneof source { // Optional. Amazon Kinesis Data Streams. AwsKinesis aws_kinesis = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Cloud Storage. + CloudStorage cloud_storage = 2 [(google.api.field_behavior) = OPTIONAL]; } + + // Optional. Platform Logs settings. If unset, no Platform Logs will be + // generated. + PlatformLogsSettings platform_logs_settings = 4 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Settings for Platform Logs produced by Pub/Sub. +message PlatformLogsSettings { + // Severity levels of Platform Logs. + enum Severity { + // Default value. Logs level is unspecified. Logs will be disabled. + SEVERITY_UNSPECIFIED = 0; + + // Logs will be disabled. + DISABLED = 1; + + // Debug logs and higher-severity logs will be written. + DEBUG = 2; + + // Info logs and higher-severity logs will be written. + INFO = 3; + + // Warning logs and higher-severity logs will be written. + WARNING = 4; + + // Only error logs will be written. + ERROR = 5; + } + + // Optional. The minimum severity level of Platform Logs that will be written. + Severity severity = 1 [(google.api.field_behavior) = OPTIONAL]; } // A topic resource. diff --git a/owl-bot-staging/v1/protos/protos.d.ts b/owl-bot-staging/v1/protos/protos.d.ts index 11596d62b..4444ae4b6 100644 --- a/owl-bot-staging/v1/protos/protos.d.ts +++ b/owl-bot-staging/v1/protos/protos.d.ts @@ -459,6 +459,12 @@ export namespace google { /** IngestionDataSourceSettings awsKinesis */ awsKinesis?: (google.pubsub.v1.IngestionDataSourceSettings.IAwsKinesis|null); + + /** IngestionDataSourceSettings cloudStorage */ + cloudStorage?: (google.pubsub.v1.IngestionDataSourceSettings.ICloudStorage|null); + + /** IngestionDataSourceSettings platformLogsSettings */ + platformLogsSettings?: (google.pubsub.v1.IPlatformLogsSettings|null); } /** Represents an IngestionDataSourceSettings. */ @@ -473,8 +479,14 @@ export namespace google { /** IngestionDataSourceSettings awsKinesis. */ public awsKinesis?: (google.pubsub.v1.IngestionDataSourceSettings.IAwsKinesis|null); + /** IngestionDataSourceSettings cloudStorage. */ + public cloudStorage?: (google.pubsub.v1.IngestionDataSourceSettings.ICloudStorage|null); + + /** IngestionDataSourceSettings platformLogsSettings. */ + public platformLogsSettings?: (google.pubsub.v1.IPlatformLogsSettings|null); + /** IngestionDataSourceSettings source. */ - public source?: "awsKinesis"; + public source?: ("awsKinesis"|"cloudStorage"); /** * Creates a new IngestionDataSourceSettings instance using the specified properties. @@ -689,6 +701,547 @@ export namespace google { CONSUMER_NOT_FOUND = 5 } } + + /** Properties of a CloudStorage. */ + interface ICloudStorage { + + /** CloudStorage state */ + state?: (google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State|keyof typeof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State|null); + + /** CloudStorage bucket */ + bucket?: (string|null); + + /** CloudStorage textFormat */ + textFormat?: (google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.ITextFormat|null); + + /** CloudStorage avroFormat */ + avroFormat?: (google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IAvroFormat|null); + + /** CloudStorage pubsubAvroFormat */ + pubsubAvroFormat?: (google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IPubSubAvroFormat|null); + + /** CloudStorage minimumObjectCreateTime */ + minimumObjectCreateTime?: (google.protobuf.ITimestamp|null); + + /** CloudStorage matchGlob */ + matchGlob?: (string|null); + } + + /** Represents a CloudStorage. */ + class CloudStorage implements ICloudStorage { + + /** + * Constructs a new CloudStorage. + * @param [properties] Properties to set + */ + constructor(properties?: google.pubsub.v1.IngestionDataSourceSettings.ICloudStorage); + + /** CloudStorage state. */ + public state: (google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State|keyof typeof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State); + + /** CloudStorage bucket. */ + public bucket: string; + + /** CloudStorage textFormat. */ + public textFormat?: (google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.ITextFormat|null); + + /** CloudStorage avroFormat. */ + public avroFormat?: (google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IAvroFormat|null); + + /** CloudStorage pubsubAvroFormat. */ + public pubsubAvroFormat?: (google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IPubSubAvroFormat|null); + + /** CloudStorage minimumObjectCreateTime. */ + public minimumObjectCreateTime?: (google.protobuf.ITimestamp|null); + + /** CloudStorage matchGlob. */ + public matchGlob: string; + + /** CloudStorage inputFormat. */ + public inputFormat?: ("textFormat"|"avroFormat"|"pubsubAvroFormat"); + + /** + * Creates a new CloudStorage instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudStorage instance + */ + public static create(properties?: google.pubsub.v1.IngestionDataSourceSettings.ICloudStorage): google.pubsub.v1.IngestionDataSourceSettings.CloudStorage; + + /** + * Encodes the specified CloudStorage message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.verify|verify} messages. + * @param message CloudStorage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.pubsub.v1.IngestionDataSourceSettings.ICloudStorage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudStorage message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.verify|verify} messages. + * @param message CloudStorage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.pubsub.v1.IngestionDataSourceSettings.ICloudStorage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudStorage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudStorage + * @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.CloudStorage; + + /** + * Decodes a CloudStorage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudStorage + * @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.CloudStorage; + + /** + * Verifies a CloudStorage 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 CloudStorage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudStorage + */ + public static fromObject(object: { [k: string]: any }): google.pubsub.v1.IngestionDataSourceSettings.CloudStorage; + + /** + * Creates a plain object from a CloudStorage message. Also converts values to other types if specified. + * @param message CloudStorage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.pubsub.v1.IngestionDataSourceSettings.CloudStorage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudStorage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudStorage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CloudStorage { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + ACTIVE = 1, + CLOUD_STORAGE_PERMISSION_DENIED = 2, + PUBLISH_PERMISSION_DENIED = 3, + BUCKET_NOT_FOUND = 4, + TOO_MANY_OBJECTS = 5 + } + + /** Properties of a TextFormat. */ + interface ITextFormat { + + /** TextFormat delimiter */ + delimiter?: (string|null); + } + + /** Represents a TextFormat. */ + class TextFormat implements ITextFormat { + + /** + * Constructs a new TextFormat. + * @param [properties] Properties to set + */ + constructor(properties?: google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.ITextFormat); + + /** TextFormat delimiter. */ + public delimiter?: (string|null); + + /** TextFormat _delimiter. */ + public _delimiter?: "delimiter"; + + /** + * Creates a new TextFormat instance using the specified properties. + * @param [properties] Properties to set + * @returns TextFormat instance + */ + public static create(properties?: google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.ITextFormat): google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat; + + /** + * Encodes the specified TextFormat message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat.verify|verify} messages. + * @param message TextFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.ITextFormat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TextFormat message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat.verify|verify} messages. + * @param message TextFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.ITextFormat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TextFormat message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TextFormat + * @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.CloudStorage.TextFormat; + + /** + * Decodes a TextFormat message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TextFormat + * @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.CloudStorage.TextFormat; + + /** + * Verifies a TextFormat 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 TextFormat message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TextFormat + */ + public static fromObject(object: { [k: string]: any }): google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat; + + /** + * Creates a plain object from a TextFormat message. Also converts values to other types if specified. + * @param message TextFormat + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TextFormat to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TextFormat + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AvroFormat. */ + interface IAvroFormat { + } + + /** Represents an AvroFormat. */ + class AvroFormat implements IAvroFormat { + + /** + * Constructs a new AvroFormat. + * @param [properties] Properties to set + */ + constructor(properties?: google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IAvroFormat); + + /** + * Creates a new AvroFormat instance using the specified properties. + * @param [properties] Properties to set + * @returns AvroFormat instance + */ + public static create(properties?: google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IAvroFormat): google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat; + + /** + * Encodes the specified AvroFormat message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat.verify|verify} messages. + * @param message AvroFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IAvroFormat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AvroFormat message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat.verify|verify} messages. + * @param message AvroFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IAvroFormat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AvroFormat message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AvroFormat + * @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.CloudStorage.AvroFormat; + + /** + * Decodes an AvroFormat message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AvroFormat + * @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.CloudStorage.AvroFormat; + + /** + * Verifies an AvroFormat 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 AvroFormat message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AvroFormat + */ + public static fromObject(object: { [k: string]: any }): google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat; + + /** + * Creates a plain object from an AvroFormat message. Also converts values to other types if specified. + * @param message AvroFormat + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AvroFormat to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AvroFormat + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PubSubAvroFormat. */ + interface IPubSubAvroFormat { + } + + /** Represents a PubSubAvroFormat. */ + class PubSubAvroFormat implements IPubSubAvroFormat { + + /** + * Constructs a new PubSubAvroFormat. + * @param [properties] Properties to set + */ + constructor(properties?: google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IPubSubAvroFormat); + + /** + * Creates a new PubSubAvroFormat instance using the specified properties. + * @param [properties] Properties to set + * @returns PubSubAvroFormat instance + */ + public static create(properties?: google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IPubSubAvroFormat): google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat; + + /** + * Encodes the specified PubSubAvroFormat message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat.verify|verify} messages. + * @param message PubSubAvroFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IPubSubAvroFormat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PubSubAvroFormat message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat.verify|verify} messages. + * @param message PubSubAvroFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IPubSubAvroFormat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PubSubAvroFormat message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PubSubAvroFormat + * @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.CloudStorage.PubSubAvroFormat; + + /** + * Decodes a PubSubAvroFormat message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PubSubAvroFormat + * @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.CloudStorage.PubSubAvroFormat; + + /** + * Verifies a PubSubAvroFormat 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 PubSubAvroFormat message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PubSubAvroFormat + */ + public static fromObject(object: { [k: string]: any }): google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat; + + /** + * Creates a plain object from a PubSubAvroFormat message. Also converts values to other types if specified. + * @param message PubSubAvroFormat + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PubSubAvroFormat to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PubSubAvroFormat + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a PlatformLogsSettings. */ + interface IPlatformLogsSettings { + + /** PlatformLogsSettings severity */ + severity?: (google.pubsub.v1.PlatformLogsSettings.Severity|keyof typeof google.pubsub.v1.PlatformLogsSettings.Severity|null); + } + + /** Represents a PlatformLogsSettings. */ + class PlatformLogsSettings implements IPlatformLogsSettings { + + /** + * Constructs a new PlatformLogsSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.pubsub.v1.IPlatformLogsSettings); + + /** PlatformLogsSettings severity. */ + public severity: (google.pubsub.v1.PlatformLogsSettings.Severity|keyof typeof google.pubsub.v1.PlatformLogsSettings.Severity); + + /** + * Creates a new PlatformLogsSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PlatformLogsSettings instance + */ + public static create(properties?: google.pubsub.v1.IPlatformLogsSettings): google.pubsub.v1.PlatformLogsSettings; + + /** + * Encodes the specified PlatformLogsSettings message. Does not implicitly {@link google.pubsub.v1.PlatformLogsSettings.verify|verify} messages. + * @param message PlatformLogsSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.pubsub.v1.IPlatformLogsSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PlatformLogsSettings message, length delimited. Does not implicitly {@link google.pubsub.v1.PlatformLogsSettings.verify|verify} messages. + * @param message PlatformLogsSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.pubsub.v1.IPlatformLogsSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PlatformLogsSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PlatformLogsSettings + * @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.PlatformLogsSettings; + + /** + * Decodes a PlatformLogsSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PlatformLogsSettings + * @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.PlatformLogsSettings; + + /** + * Verifies a PlatformLogsSettings 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 PlatformLogsSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PlatformLogsSettings + */ + public static fromObject(object: { [k: string]: any }): google.pubsub.v1.PlatformLogsSettings; + + /** + * Creates a plain object from a PlatformLogsSettings message. Also converts values to other types if specified. + * @param message PlatformLogsSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.pubsub.v1.PlatformLogsSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PlatformLogsSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PlatformLogsSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PlatformLogsSettings { + + /** Severity enum. */ + enum Severity { + SEVERITY_UNSPECIFIED = 0, + DISABLED = 1, + DEBUG = 2, + INFO = 3, + WARNING = 4, + ERROR = 5 + } } /** Properties of a Topic. */ diff --git a/owl-bot-staging/v1/protos/protos.js b/owl-bot-staging/v1/protos/protos.js index ec8445fcf..b1c1f01d2 100644 --- a/owl-bot-staging/v1/protos/protos.js +++ b/owl-bot-staging/v1/protos/protos.js @@ -936,6 +936,8 @@ * @memberof google.pubsub.v1 * @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.IPlatformLogsSettings|null} [platformLogsSettings] IngestionDataSourceSettings platformLogsSettings */ /** @@ -961,17 +963,33 @@ */ IngestionDataSourceSettings.prototype.awsKinesis = null; + /** + * IngestionDataSourceSettings cloudStorage. + * @member {google.pubsub.v1.IngestionDataSourceSettings.ICloudStorage|null|undefined} cloudStorage + * @memberof google.pubsub.v1.IngestionDataSourceSettings + * @instance + */ + IngestionDataSourceSettings.prototype.cloudStorage = null; + + /** + * IngestionDataSourceSettings platformLogsSettings. + * @member {google.pubsub.v1.IPlatformLogsSettings|null|undefined} platformLogsSettings + * @memberof google.pubsub.v1.IngestionDataSourceSettings + * @instance + */ + IngestionDataSourceSettings.prototype.platformLogsSettings = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * IngestionDataSourceSettings source. - * @member {"awsKinesis"|undefined} source + * @member {"awsKinesis"|"cloudStorage"|undefined} source * @memberof google.pubsub.v1.IngestionDataSourceSettings * @instance */ Object.defineProperty(IngestionDataSourceSettings.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["awsKinesis"]), + get: $util.oneOfGetter($oneOfFields = ["awsKinesis", "cloudStorage"]), set: $util.oneOfSetter($oneOfFields) }); @@ -1001,6 +1019,10 @@ writer = $Writer.create(); if (message.awsKinesis != null && Object.hasOwnProperty.call(message, "awsKinesis")) $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.platformLogsSettings != null && Object.hasOwnProperty.call(message, "platformLogsSettings")) + $root.google.pubsub.v1.PlatformLogsSettings.encode(message.platformLogsSettings, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -1039,6 +1061,14 @@ message.awsKinesis = $root.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.decode(reader, reader.uint32()); break; } + case 2: { + message.cloudStorage = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.decode(reader, reader.uint32()); + break; + } + case 4: { + message.platformLogsSettings = $root.google.pubsub.v1.PlatformLogsSettings.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -1083,6 +1113,21 @@ return "awsKinesis." + error; } } + if (message.cloudStorage != null && message.hasOwnProperty("cloudStorage")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.verify(message.cloudStorage); + if (error) + return "cloudStorage." + error; + } + } + if (message.platformLogsSettings != null && message.hasOwnProperty("platformLogsSettings")) { + var error = $root.google.pubsub.v1.PlatformLogsSettings.verify(message.platformLogsSettings); + if (error) + return "platformLogsSettings." + error; + } return null; }; @@ -1103,6 +1148,16 @@ throw TypeError(".google.pubsub.v1.IngestionDataSourceSettings.awsKinesis: object expected"); message.awsKinesis = $root.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.fromObject(object.awsKinesis); } + if (object.cloudStorage != null) { + if (typeof object.cloudStorage !== "object") + throw TypeError(".google.pubsub.v1.IngestionDataSourceSettings.cloudStorage: object expected"); + message.cloudStorage = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.fromObject(object.cloudStorage); + } + if (object.platformLogsSettings != null) { + if (typeof object.platformLogsSettings !== "object") + throw TypeError(".google.pubsub.v1.IngestionDataSourceSettings.platformLogsSettings: object expected"); + message.platformLogsSettings = $root.google.pubsub.v1.PlatformLogsSettings.fromObject(object.platformLogsSettings); + } return message; }; @@ -1119,11 +1174,20 @@ if (!options) options = {}; var object = {}; + if (options.defaults) + object.platformLogsSettings = null; if (message.awsKinesis != null && message.hasOwnProperty("awsKinesis")) { object.awsKinesis = $root.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.toObject(message.awsKinesis, options); if (options.oneofs) object.source = "awsKinesis"; } + if (message.cloudStorage != null && message.hasOwnProperty("cloudStorage")) { + object.cloudStorage = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.toObject(message.cloudStorage, options); + if (options.oneofs) + object.source = "cloudStorage"; + } + if (message.platformLogsSettings != null && message.hasOwnProperty("platformLogsSettings")) + object.platformLogsSettings = $root.google.pubsub.v1.PlatformLogsSettings.toObject(message.platformLogsSettings, options); return object; }; @@ -1510,9 +1574,1301 @@ return AwsKinesis; })(); + IngestionDataSourceSettings.CloudStorage = (function() { + + /** + * Properties of a CloudStorage. + * @memberof google.pubsub.v1.IngestionDataSourceSettings + * @interface ICloudStorage + * @property {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State|null} [state] CloudStorage state + * @property {string|null} [bucket] CloudStorage bucket + * @property {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.ITextFormat|null} [textFormat] CloudStorage textFormat + * @property {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IAvroFormat|null} [avroFormat] CloudStorage avroFormat + * @property {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IPubSubAvroFormat|null} [pubsubAvroFormat] CloudStorage pubsubAvroFormat + * @property {google.protobuf.ITimestamp|null} [minimumObjectCreateTime] CloudStorage minimumObjectCreateTime + * @property {string|null} [matchGlob] CloudStorage matchGlob + */ + + /** + * Constructs a new CloudStorage. + * @memberof google.pubsub.v1.IngestionDataSourceSettings + * @classdesc Represents a CloudStorage. + * @implements ICloudStorage + * @constructor + * @param {google.pubsub.v1.IngestionDataSourceSettings.ICloudStorage=} [properties] Properties to set + */ + function CloudStorage(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]]; + } + + /** + * CloudStorage state. + * @member {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State} state + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage + * @instance + */ + CloudStorage.prototype.state = 0; + + /** + * CloudStorage bucket. + * @member {string} bucket + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage + * @instance + */ + CloudStorage.prototype.bucket = ""; + + /** + * CloudStorage textFormat. + * @member {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.ITextFormat|null|undefined} textFormat + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage + * @instance + */ + CloudStorage.prototype.textFormat = null; + + /** + * CloudStorage avroFormat. + * @member {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IAvroFormat|null|undefined} avroFormat + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage + * @instance + */ + CloudStorage.prototype.avroFormat = null; + + /** + * CloudStorage pubsubAvroFormat. + * @member {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IPubSubAvroFormat|null|undefined} pubsubAvroFormat + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage + * @instance + */ + CloudStorage.prototype.pubsubAvroFormat = null; + + /** + * CloudStorage minimumObjectCreateTime. + * @member {google.protobuf.ITimestamp|null|undefined} minimumObjectCreateTime + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage + * @instance + */ + CloudStorage.prototype.minimumObjectCreateTime = null; + + /** + * CloudStorage matchGlob. + * @member {string} matchGlob + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage + * @instance + */ + CloudStorage.prototype.matchGlob = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CloudStorage inputFormat. + * @member {"textFormat"|"avroFormat"|"pubsubAvroFormat"|undefined} inputFormat + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage + * @instance + */ + Object.defineProperty(CloudStorage.prototype, "inputFormat", { + get: $util.oneOfGetter($oneOfFields = ["textFormat", "avroFormat", "pubsubAvroFormat"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CloudStorage instance using the specified properties. + * @function create + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage + * @static + * @param {google.pubsub.v1.IngestionDataSourceSettings.ICloudStorage=} [properties] Properties to set + * @returns {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage} CloudStorage instance + */ + CloudStorage.create = function create(properties) { + return new CloudStorage(properties); + }; + + /** + * Encodes the specified CloudStorage message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.verify|verify} messages. + * @function encode + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage + * @static + * @param {google.pubsub.v1.IngestionDataSourceSettings.ICloudStorage} message CloudStorage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudStorage.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.bucket != null && Object.hasOwnProperty.call(message, "bucket")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.bucket); + if (message.textFormat != null && Object.hasOwnProperty.call(message, "textFormat")) + $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat.encode(message.textFormat, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.avroFormat != null && Object.hasOwnProperty.call(message, "avroFormat")) + $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat.encode(message.avroFormat, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.pubsubAvroFormat != null && Object.hasOwnProperty.call(message, "pubsubAvroFormat")) + $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat.encode(message.pubsubAvroFormat, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.minimumObjectCreateTime != null && Object.hasOwnProperty.call(message, "minimumObjectCreateTime")) + $root.google.protobuf.Timestamp.encode(message.minimumObjectCreateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.matchGlob != null && Object.hasOwnProperty.call(message, "matchGlob")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.matchGlob); + return writer; + }; + + /** + * Encodes the specified CloudStorage message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage + * @static + * @param {google.pubsub.v1.IngestionDataSourceSettings.ICloudStorage} message CloudStorage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudStorage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudStorage message from the specified reader or buffer. + * @function decode + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage + * @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.CloudStorage} CloudStorage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudStorage.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.CloudStorage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.state = reader.int32(); + break; + } + case 2: { + message.bucket = reader.string(); + break; + } + case 3: { + message.textFormat = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat.decode(reader, reader.uint32()); + break; + } + case 4: { + message.avroFormat = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat.decode(reader, reader.uint32()); + break; + } + case 5: { + message.pubsubAvroFormat = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat.decode(reader, reader.uint32()); + break; + } + case 6: { + message.minimumObjectCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.matchGlob = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudStorage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage} CloudStorage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudStorage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudStorage message. + * @function verify + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudStorage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + 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.bucket != null && message.hasOwnProperty("bucket")) + if (!$util.isString(message.bucket)) + return "bucket: string expected"; + if (message.textFormat != null && message.hasOwnProperty("textFormat")) { + properties.inputFormat = 1; + { + var error = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat.verify(message.textFormat); + if (error) + return "textFormat." + error; + } + } + if (message.avroFormat != null && message.hasOwnProperty("avroFormat")) { + if (properties.inputFormat === 1) + return "inputFormat: multiple values"; + properties.inputFormat = 1; + { + var error = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat.verify(message.avroFormat); + if (error) + return "avroFormat." + error; + } + } + if (message.pubsubAvroFormat != null && message.hasOwnProperty("pubsubAvroFormat")) { + if (properties.inputFormat === 1) + return "inputFormat: multiple values"; + properties.inputFormat = 1; + { + var error = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat.verify(message.pubsubAvroFormat); + if (error) + return "pubsubAvroFormat." + error; + } + } + if (message.minimumObjectCreateTime != null && message.hasOwnProperty("minimumObjectCreateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.minimumObjectCreateTime); + if (error) + return "minimumObjectCreateTime." + error; + } + if (message.matchGlob != null && message.hasOwnProperty("matchGlob")) + if (!$util.isString(message.matchGlob)) + return "matchGlob: string expected"; + return null; + }; + + /** + * Creates a CloudStorage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage + * @static + * @param {Object.} object Plain object + * @returns {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage} CloudStorage + */ + CloudStorage.fromObject = function fromObject(object) { + if (object instanceof $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage) + return object; + var message = new $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage(); + 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 "CLOUD_STORAGE_PERMISSION_DENIED": + case 2: + message.state = 2; + break; + case "PUBLISH_PERMISSION_DENIED": + case 3: + message.state = 3; + break; + case "BUCKET_NOT_FOUND": + case 4: + message.state = 4; + break; + case "TOO_MANY_OBJECTS": + case 5: + message.state = 5; + break; + } + if (object.bucket != null) + message.bucket = String(object.bucket); + if (object.textFormat != null) { + if (typeof object.textFormat !== "object") + throw TypeError(".google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.textFormat: object expected"); + message.textFormat = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat.fromObject(object.textFormat); + } + if (object.avroFormat != null) { + if (typeof object.avroFormat !== "object") + throw TypeError(".google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.avroFormat: object expected"); + message.avroFormat = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat.fromObject(object.avroFormat); + } + if (object.pubsubAvroFormat != null) { + if (typeof object.pubsubAvroFormat !== "object") + throw TypeError(".google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.pubsubAvroFormat: object expected"); + message.pubsubAvroFormat = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat.fromObject(object.pubsubAvroFormat); + } + if (object.minimumObjectCreateTime != null) { + if (typeof object.minimumObjectCreateTime !== "object") + throw TypeError(".google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.minimumObjectCreateTime: object expected"); + message.minimumObjectCreateTime = $root.google.protobuf.Timestamp.fromObject(object.minimumObjectCreateTime); + } + if (object.matchGlob != null) + message.matchGlob = String(object.matchGlob); + return message; + }; + + /** + * Creates a plain object from a CloudStorage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage + * @static + * @param {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage} message CloudStorage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudStorage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.bucket = ""; + object.minimumObjectCreateTime = null; + object.matchGlob = ""; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State[message.state] === undefined ? message.state : $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State[message.state] : message.state; + if (message.bucket != null && message.hasOwnProperty("bucket")) + object.bucket = message.bucket; + if (message.textFormat != null && message.hasOwnProperty("textFormat")) { + object.textFormat = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat.toObject(message.textFormat, options); + if (options.oneofs) + object.inputFormat = "textFormat"; + } + if (message.avroFormat != null && message.hasOwnProperty("avroFormat")) { + object.avroFormat = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat.toObject(message.avroFormat, options); + if (options.oneofs) + object.inputFormat = "avroFormat"; + } + if (message.pubsubAvroFormat != null && message.hasOwnProperty("pubsubAvroFormat")) { + object.pubsubAvroFormat = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat.toObject(message.pubsubAvroFormat, options); + if (options.oneofs) + object.inputFormat = "pubsubAvroFormat"; + } + if (message.minimumObjectCreateTime != null && message.hasOwnProperty("minimumObjectCreateTime")) + object.minimumObjectCreateTime = $root.google.protobuf.Timestamp.toObject(message.minimumObjectCreateTime, options); + if (message.matchGlob != null && message.hasOwnProperty("matchGlob")) + object.matchGlob = message.matchGlob; + return object; + }; + + /** + * Converts this CloudStorage to JSON. + * @function toJSON + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage + * @instance + * @returns {Object.} JSON object + */ + CloudStorage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudStorage + * @function getTypeUrl + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudStorage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.pubsub.v1.IngestionDataSourceSettings.CloudStorage"; + }; + + /** + * State enum. + * @name google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} CLOUD_STORAGE_PERMISSION_DENIED=2 CLOUD_STORAGE_PERMISSION_DENIED value + * @property {number} PUBLISH_PERMISSION_DENIED=3 PUBLISH_PERMISSION_DENIED value + * @property {number} BUCKET_NOT_FOUND=4 BUCKET_NOT_FOUND value + * @property {number} TOO_MANY_OBJECTS=5 TOO_MANY_OBJECTS value + */ + CloudStorage.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "CLOUD_STORAGE_PERMISSION_DENIED"] = 2; + values[valuesById[3] = "PUBLISH_PERMISSION_DENIED"] = 3; + values[valuesById[4] = "BUCKET_NOT_FOUND"] = 4; + values[valuesById[5] = "TOO_MANY_OBJECTS"] = 5; + return values; + })(); + + CloudStorage.TextFormat = (function() { + + /** + * Properties of a TextFormat. + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage + * @interface ITextFormat + * @property {string|null} [delimiter] TextFormat delimiter + */ + + /** + * Constructs a new TextFormat. + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage + * @classdesc Represents a TextFormat. + * @implements ITextFormat + * @constructor + * @param {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.ITextFormat=} [properties] Properties to set + */ + function TextFormat(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]]; + } + + /** + * TextFormat delimiter. + * @member {string|null|undefined} delimiter + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat + * @instance + */ + TextFormat.prototype.delimiter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TextFormat _delimiter. + * @member {"delimiter"|undefined} _delimiter + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat + * @instance + */ + Object.defineProperty(TextFormat.prototype, "_delimiter", { + get: $util.oneOfGetter($oneOfFields = ["delimiter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TextFormat instance using the specified properties. + * @function create + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat + * @static + * @param {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.ITextFormat=} [properties] Properties to set + * @returns {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat} TextFormat instance + */ + TextFormat.create = function create(properties) { + return new TextFormat(properties); + }; + + /** + * Encodes the specified TextFormat message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat.verify|verify} messages. + * @function encode + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat + * @static + * @param {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.ITextFormat} message TextFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextFormat.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delimiter); + return writer; + }; + + /** + * Encodes the specified TextFormat message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat.verify|verify} messages. + * @function encodeDelimited + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat + * @static + * @param {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.ITextFormat} message TextFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextFormat.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TextFormat message from the specified reader or buffer. + * @function decode + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat + * @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.CloudStorage.TextFormat} TextFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextFormat.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.CloudStorage.TextFormat(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.delimiter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TextFormat message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat} TextFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextFormat.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TextFormat message. + * @function verify + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TextFormat.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) { + properties._delimiter = 1; + if (!$util.isString(message.delimiter)) + return "delimiter: string expected"; + } + return null; + }; + + /** + * Creates a TextFormat message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat + * @static + * @param {Object.} object Plain object + * @returns {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat} TextFormat + */ + TextFormat.fromObject = function fromObject(object) { + if (object instanceof $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat) + return object; + var message = new $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat(); + if (object.delimiter != null) + message.delimiter = String(object.delimiter); + return message; + }; + + /** + * Creates a plain object from a TextFormat message. Also converts values to other types if specified. + * @function toObject + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat + * @static + * @param {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat} message TextFormat + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TextFormat.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) { + object.delimiter = message.delimiter; + if (options.oneofs) + object._delimiter = "delimiter"; + } + return object; + }; + + /** + * Converts this TextFormat to JSON. + * @function toJSON + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat + * @instance + * @returns {Object.} JSON object + */ + TextFormat.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TextFormat + * @function getTypeUrl + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TextFormat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat"; + }; + + return TextFormat; + })(); + + CloudStorage.AvroFormat = (function() { + + /** + * Properties of an AvroFormat. + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage + * @interface IAvroFormat + */ + + /** + * Constructs a new AvroFormat. + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage + * @classdesc Represents an AvroFormat. + * @implements IAvroFormat + * @constructor + * @param {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IAvroFormat=} [properties] Properties to set + */ + function AvroFormat(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 AvroFormat instance using the specified properties. + * @function create + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat + * @static + * @param {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IAvroFormat=} [properties] Properties to set + * @returns {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat} AvroFormat instance + */ + AvroFormat.create = function create(properties) { + return new AvroFormat(properties); + }; + + /** + * Encodes the specified AvroFormat message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat.verify|verify} messages. + * @function encode + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat + * @static + * @param {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IAvroFormat} message AvroFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AvroFormat.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified AvroFormat message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat.verify|verify} messages. + * @function encodeDelimited + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat + * @static + * @param {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IAvroFormat} message AvroFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AvroFormat.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AvroFormat message from the specified reader or buffer. + * @function decode + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat + * @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.CloudStorage.AvroFormat} AvroFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AvroFormat.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.CloudStorage.AvroFormat(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AvroFormat message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat} AvroFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AvroFormat.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AvroFormat message. + * @function verify + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AvroFormat.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an AvroFormat message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat + * @static + * @param {Object.} object Plain object + * @returns {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat} AvroFormat + */ + AvroFormat.fromObject = function fromObject(object) { + if (object instanceof $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat) + return object; + return new $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat(); + }; + + /** + * Creates a plain object from an AvroFormat message. Also converts values to other types if specified. + * @function toObject + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat + * @static + * @param {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat} message AvroFormat + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AvroFormat.toObject = function toObject() { + return {}; + }; + + /** + * Converts this AvroFormat to JSON. + * @function toJSON + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat + * @instance + * @returns {Object.} JSON object + */ + AvroFormat.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AvroFormat + * @function getTypeUrl + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AvroFormat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat"; + }; + + return AvroFormat; + })(); + + CloudStorage.PubSubAvroFormat = (function() { + + /** + * Properties of a PubSubAvroFormat. + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage + * @interface IPubSubAvroFormat + */ + + /** + * Constructs a new PubSubAvroFormat. + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage + * @classdesc Represents a PubSubAvroFormat. + * @implements IPubSubAvroFormat + * @constructor + * @param {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IPubSubAvroFormat=} [properties] Properties to set + */ + function PubSubAvroFormat(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 PubSubAvroFormat instance using the specified properties. + * @function create + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat + * @static + * @param {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IPubSubAvroFormat=} [properties] Properties to set + * @returns {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat} PubSubAvroFormat instance + */ + PubSubAvroFormat.create = function create(properties) { + return new PubSubAvroFormat(properties); + }; + + /** + * Encodes the specified PubSubAvroFormat message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat.verify|verify} messages. + * @function encode + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat + * @static + * @param {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IPubSubAvroFormat} message PubSubAvroFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PubSubAvroFormat.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified PubSubAvroFormat message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat.verify|verify} messages. + * @function encodeDelimited + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat + * @static + * @param {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IPubSubAvroFormat} message PubSubAvroFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PubSubAvroFormat.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PubSubAvroFormat message from the specified reader or buffer. + * @function decode + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat + * @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.CloudStorage.PubSubAvroFormat} PubSubAvroFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PubSubAvroFormat.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.CloudStorage.PubSubAvroFormat(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PubSubAvroFormat message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat} PubSubAvroFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PubSubAvroFormat.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PubSubAvroFormat message. + * @function verify + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PubSubAvroFormat.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a PubSubAvroFormat message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat + * @static + * @param {Object.} object Plain object + * @returns {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat} PubSubAvroFormat + */ + PubSubAvroFormat.fromObject = function fromObject(object) { + if (object instanceof $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat) + return object; + return new $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat(); + }; + + /** + * Creates a plain object from a PubSubAvroFormat message. Also converts values to other types if specified. + * @function toObject + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat + * @static + * @param {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat} message PubSubAvroFormat + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PubSubAvroFormat.toObject = function toObject() { + return {}; + }; + + /** + * Converts this PubSubAvroFormat to JSON. + * @function toJSON + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat + * @instance + * @returns {Object.} JSON object + */ + PubSubAvroFormat.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PubSubAvroFormat + * @function getTypeUrl + * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PubSubAvroFormat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat"; + }; + + return PubSubAvroFormat; + })(); + + return CloudStorage; + })(); + 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; + break; + case "INFO": + case 3: + message.severity = 3; + break; + case "WARNING": + case 4: + message.severity = 4; + break; + case "ERROR": + case 5: + message.severity = 5; + break; + } + 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; + }; + + /** + * 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.Topic = (function() { /** diff --git a/owl-bot-staging/v1/protos/protos.json b/owl-bot-staging/v1/protos/protos.json index 7458c8ab3..8a45eb1bc 100644 --- a/owl-bot-staging/v1/protos/protos.json +++ b/owl-bot-staging/v1/protos/protos.json @@ -244,7 +244,8 @@ "oneofs": { "source": { "oneof": [ - "awsKinesis" + "awsKinesis", + "cloudStorage" ] } }, @@ -255,6 +256,20 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "cloudStorage": { + "type": "CloudStorage", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "platformLogsSettings": { + "type": "PlatformLogsSettings", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -308,6 +323,128 @@ } } } + }, + "CloudStorage": { + "oneofs": { + "inputFormat": { + "oneof": [ + "textFormat", + "avroFormat", + "pubsubAvroFormat" + ] + } + }, + "fields": { + "state": { + "type": "State", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "bucket": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "textFormat": { + "type": "TextFormat", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "avroFormat": { + "type": "AvroFormat", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pubsubAvroFormat": { + "type": "PubSubAvroFormat", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "minimumObjectCreateTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "matchGlob": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "CLOUD_STORAGE_PERMISSION_DENIED": 2, + "PUBLISH_PERMISSION_DENIED": 3, + "BUCKET_NOT_FOUND": 4, + "TOO_MANY_OBJECTS": 5 + } + }, + "TextFormat": { + "oneofs": { + "_delimiter": { + "oneof": [ + "delimiter" + ] + } + }, + "fields": { + "delimiter": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "AvroFormat": { + "fields": {} + }, + "PubSubAvroFormat": { + "fields": {} + } + } + } + } + }, + "PlatformLogsSettings": { + "fields": { + "severity": { + "type": "Severity", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Severity": { + "values": { + "SEVERITY_UNSPECIFIED": 0, + "DISABLED": 1, + "DEBUG": 2, + "INFO": 3, + "WARNING": 4, + "ERROR": 5 + } } } },