diff --git a/packages/google-cloud-bigquery-datatransfer/protos/google/cloud/bigquery/datatransfer/v1/datatransfer.proto b/packages/google-cloud-bigquery-datatransfer/protos/google/cloud/bigquery/datatransfer/v1/datatransfer.proto index e9a39683494..a464645b5ac 100644 --- a/packages/google-cloud-bigquery-datatransfer/protos/google/cloud/bigquery/datatransfer/v1/datatransfer.proto +++ b/packages/google-cloud-bigquery-datatransfer/protos/google/cloud/bigquery/datatransfer/v1/datatransfer.proto @@ -18,13 +18,15 @@ syntax = "proto3"; package google.cloud.bigquery.datatransfer.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/bigquery/datatransfer/v1/transfer.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Cloud.BigQuery.DataTransfer.V1"; option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1;datatransfer"; @@ -50,6 +52,7 @@ service DataTransferService { get: "/v1/{name=projects/*/dataSources/*}" } }; + option (google.api.method_signature) = "name"; } // Lists supported data sources and returns their settings, @@ -61,6 +64,7 @@ service DataTransferService { get: "/v1/{parent=projects/*}/dataSources" } }; + option (google.api.method_signature) = "parent"; } // Creates a new data transfer configuration. @@ -73,6 +77,7 @@ service DataTransferService { body: "transfer_config" } }; + option (google.api.method_signature) = "parent,transfer_config"; } // Updates a data transfer configuration. @@ -86,6 +91,7 @@ service DataTransferService { body: "transfer_config" } }; + option (google.api.method_signature) = "transfer_config,update_mask"; } // Deletes a data transfer configuration, @@ -97,6 +103,7 @@ service DataTransferService { delete: "/v1/{name=projects/*/transferConfigs/*}" } }; + option (google.api.method_signature) = "name"; } // Returns information about a data transfer config. @@ -107,6 +114,7 @@ service DataTransferService { get: "/v1/{name=projects/*/transferConfigs/*}" } }; + option (google.api.method_signature) = "name"; } // Returns information about all data transfers in the project. @@ -117,6 +125,7 @@ service DataTransferService { get: "/v1/{parent=projects/*}/transferConfigs" } }; + option (google.api.method_signature) = "parent"; } // Creates transfer runs for a time range [start_time, end_time]. @@ -134,6 +143,7 @@ service DataTransferService { body: "*" } }; + option (google.api.method_signature) = "parent,start_time,end_time"; } // Start manual transfer runs to be executed now with schedule_time equal to @@ -159,6 +169,7 @@ service DataTransferService { get: "/v1/{name=projects/*/transferConfigs/*/runs/*}" } }; + option (google.api.method_signature) = "name"; } // Deletes the specified transfer run. @@ -169,6 +180,7 @@ service DataTransferService { delete: "/v1/{name=projects/*/transferConfigs/*/runs/*}" } }; + option (google.api.method_signature) = "name"; } // Returns information about running and completed jobs. @@ -179,6 +191,7 @@ service DataTransferService { get: "/v1/{parent=projects/*/transferConfigs/*}/runs" } }; + option (google.api.method_signature) = "parent"; } // Returns user facing log messages for the data transfer run. @@ -189,6 +202,7 @@ service DataTransferService { get: "/v1/{parent=projects/*/transferConfigs/*/runs/*}/transferLogs" } }; + option (google.api.method_signature) = "parent"; } // Returns true if valid credentials exist for the given data source and @@ -206,6 +220,7 @@ service DataTransferService { body: "*" } }; + option (google.api.method_signature) = "name"; } } @@ -295,6 +310,11 @@ message DataSourceParameter { // Represents data source metadata. Metadata is sufficient to // render UI and request proper OAuth tokens. message DataSource { + option (google.api.resource) = { + type: "bigquerydatatransfer.googleapis.com/DataSource" + pattern: "projects/{project}/dataSources/{data_source}" + }; + // The type of authorization needed for this data source. enum AuthorizationType { // Type unspecified. @@ -326,7 +346,7 @@ message DataSource { } // Output only. Data source resource name. - string name = 1; + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Data source id. string data_source_id = 2; @@ -396,16 +416,26 @@ message DataSource { // A request to get data source info. message GetDataSourceRequest { - // The field will contain name of the resource requested, for example: + // Required. The field will contain name of the resource requested, for example: // `projects/{project_id}/dataSources/{data_source_id}` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerydatatransfer.googleapis.com/DataSource" + } + ]; } // Request to list supported data sources and their data transfer settings. message ListDataSourcesRequest { - // The BigQuery project id for which data sources should be returned. + // Required. The BigQuery project id for which data sources should be returned. // Must be in the form: `projects/{project_id}` - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; // Pagination token, which can be used to request a specific page // of `ListDataSourcesRequest` list results. For multiple-page @@ -427,7 +457,7 @@ message ListDataSourcesResponse { // this token can be used as the // `ListDataSourcesRequest.page_token` // to request the next page of list results. - string next_page_token = 2; + string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A request to create a data transfer configuration. If new credentials are @@ -437,14 +467,19 @@ message ListDataSourcesResponse { // authorization code. Otherwise, the transfer configuration will be associated // with the calling user. message CreateTransferConfigRequest { - // The BigQuery project id where the transfer configuration should be created. + // Required. The BigQuery project id where the transfer configuration should be created. // Must be in the format projects/{project_id}/locations/{location_id} // If specified location and location of the destination bigquery dataset // do not match - the request will fail. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; - // Data transfer configuration to create. - TransferConfig transfer_config = 2; + // Required. Data transfer configuration to create. + TransferConfig transfer_config = 2 [(google.api.field_behavior) = REQUIRED]; // Optional OAuth2 authorization code to use with this transfer configuration. // This is required if new credentials are needed, as indicated by @@ -476,8 +511,8 @@ message CreateTransferConfigRequest { // A request to update a transfer configuration. To update the user id of the // transfer configuration, an authorization code needs to be provided. message UpdateTransferConfigRequest { - // Data transfer configuration to create. - TransferConfig transfer_config = 1; + // Required. Data transfer configuration to create. + TransferConfig transfer_config = 1 [(google.api.field_behavior) = REQUIRED]; // Optional OAuth2 authorization code to use with this transfer configuration. // If it is provided, the transfer configuration will be associated with the @@ -497,8 +532,8 @@ message UpdateTransferConfigRequest { // the user to copy the code and paste it in the application. string authorization_code = 3; - // Required list of fields to be updated in this request. - google.protobuf.FieldMask update_mask = 4; + // Required. Required list of fields to be updated in this request. + google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = REQUIRED]; // Optional version info. If users want to find a very recent access token, // that is, immediately after approving access, users have to set the @@ -511,38 +546,63 @@ message UpdateTransferConfigRequest { // A request to get data transfer information. message GetTransferConfigRequest { - // The field will contain name of the resource requested, for example: + // Required. The field will contain name of the resource requested, for example: // `projects/{project_id}/transferConfigs/{config_id}` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerydatatransfer.googleapis.com/TransferConfig" + } + ]; } // A request to delete data transfer information. All associated transfer runs // and log messages will be deleted as well. message DeleteTransferConfigRequest { - // The field will contain name of the resource requested, for example: + // Required. The field will contain name of the resource requested, for example: // `projects/{project_id}/transferConfigs/{config_id}` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerydatatransfer.googleapis.com/TransferConfig" + } + ]; } // A request to get data transfer run information. message GetTransferRunRequest { - // The field will contain name of the resource requested, for example: + // Required. The field will contain name of the resource requested, for example: // `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerydatatransfer.googleapis.com/TransferRun" + } + ]; } // A request to delete data transfer run information. message DeleteTransferRunRequest { - // The field will contain name of the resource requested, for example: + // Required. The field will contain name of the resource requested, for example: // `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerydatatransfer.googleapis.com/TransferRun" + } + ]; } // A request to list data transfers configured for a BigQuery project. message ListTransferConfigsRequest { - // The BigQuery project id for which data sources + // Required. The BigQuery project id for which data sources // should be returned: `projects/{project_id}`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; // When specified, only configurations of requested data sources are returned. repeated string data_source_ids = 2; @@ -561,13 +621,13 @@ message ListTransferConfigsRequest { // The returned list of pipelines in the project. message ListTransferConfigsResponse { // Output only. The stored pipeline transfer configurations. - repeated TransferConfig transfer_configs = 1; + repeated TransferConfig transfer_configs = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The next-pagination token. For multiple-page list results, // this token can be used as the // `ListTransferConfigsRequest.page_token` // to request the next page of list results. - string next_page_token = 2; + string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A request to list data transfer runs. UI can use this method to show/filter @@ -583,10 +643,15 @@ message ListTransferRunsRequest { LATEST = 1; } - // Name of transfer configuration for which transfer runs should be retrieved. + // Required. Name of transfer configuration for which transfer runs should be retrieved. // Format of transfer configuration resource name is: // `projects/{project_id}/transferConfigs/{config_id}`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerydatatransfer.googleapis.com/TransferConfig" + } + ]; // When specified, only transfer runs with requested states are returned. repeated TransferState states = 2; @@ -608,20 +673,25 @@ message ListTransferRunsRequest { // The returned list of pipelines in the project. message ListTransferRunsResponse { // Output only. The stored pipeline transfer runs. - repeated TransferRun transfer_runs = 1; + repeated TransferRun transfer_runs = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The next-pagination token. For multiple-page list results, // this token can be used as the // `ListTransferRunsRequest.page_token` // to request the next page of list results. - string next_page_token = 2; + string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A request to get user facing log messages associated with data transfer run. message ListTransferLogsRequest { - // Transfer run name in the form: + // Required. Transfer run name in the form: // `projects/{project_id}/transferConfigs/{config_Id}/runs/{run_id}`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerydatatransfer.googleapis.com/TransferRun" + } + ]; // Pagination token, which can be used to request a specific page // of `ListTransferLogsRequest` list results. For multiple-page @@ -641,13 +711,13 @@ message ListTransferLogsRequest { // The returned list transfer run messages. message ListTransferLogsResponse { // Output only. The stored pipeline transfer messages. - repeated TransferMessage transfer_messages = 1; + repeated TransferMessage transfer_messages = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The next-pagination token. For multiple-page list results, // this token can be used as the // `GetTransferRunLogRequest.page_token` // to request the next page of list results. - string next_page_token = 2; + string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A request to determine whether the user has valid credentials. This method @@ -657,9 +727,14 @@ message ListTransferLogsResponse { // returns false, as it cannot be determined whether the credentials are // already valid merely based on the user id. message CheckValidCredsRequest { - // The data source in the form: + // Required. The data source in the form: // `projects/{project_id}/dataSources/{data_source_id}` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerydatatransfer.googleapis.com/DataSource" + } + ]; } // A response indicating whether the credentials exist and are valid. @@ -670,17 +745,22 @@ message CheckValidCredsResponse { // A request to schedule transfer runs for a time range. message ScheduleTransferRunsRequest { - // Transfer configuration name in the form: + // Required. Transfer configuration name in the form: // `projects/{project_id}/transferConfigs/{config_id}`. - string parent = 1; - - // Start time of the range of transfer runs. For example, + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerydatatransfer.googleapis.com/TransferConfig" + } + ]; + + // Required. Start time of the range of transfer runs. For example, // `"2017-05-25T00:00:00+00:00"`. - google.protobuf.Timestamp start_time = 2; + google.protobuf.Timestamp start_time = 2 [(google.api.field_behavior) = REQUIRED]; - // End time of the range of transfer runs. For example, + // Required. End time of the range of transfer runs. For example, // `"2017-05-30T00:00:00+00:00"`. - google.protobuf.Timestamp end_time = 3; + google.protobuf.Timestamp end_time = 3 [(google.api.field_behavior) = REQUIRED]; } // A response to schedule transfer runs for a time range. @@ -709,7 +789,9 @@ message StartManualTransferRunsRequest { // Transfer configuration name in the form: // `projects/{project_id}/transferConfigs/{config_id}`. - string parent = 1; + string parent = 1 [(google.api.resource_reference) = { + type: "bigquerydatatransfer.googleapis.com/TransferConfig" + }]; // The requested time specification - this can be a time range or a specific // run_time. diff --git a/packages/google-cloud-bigquery-datatransfer/protos/google/cloud/bigquery/datatransfer/v1/transfer.proto b/packages/google-cloud-bigquery-datatransfer/protos/google/cloud/bigquery/datatransfer/v1/transfer.proto index 9501ea3cc3b..b0982d28686 100644 --- a/packages/google-cloud-bigquery-datatransfer/protos/google/cloud/bigquery/datatransfer/v1/transfer.proto +++ b/packages/google-cloud-bigquery-datatransfer/protos/google/cloud/bigquery/datatransfer/v1/transfer.proto @@ -17,7 +17,8 @@ syntax = "proto3"; package google.cloud.bigquery.datatransfer.v1; -import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; @@ -96,6 +97,11 @@ message ScheduleOptions { // `destination_dataset_id` is created when needed and shared with the // appropriate data source service account. message TransferConfig { + option (google.api.resource) = { + type: "bigquerydatatransfer.googleapis.com/TransferConfig" + pattern: "projects/{project}/transferConfigs/{transfer_config}" + }; + // The resource name of the transfer config. // Transfer config names have the form of // `projects/{project_id}/locations/{region}/transferConfigs/{config_id}`. @@ -105,8 +111,11 @@ message TransferConfig { // required, will be generated for config_id. string name = 1; - // The BigQuery target dataset id. - string destination_dataset_id = 2; + // The desination of the transfer config. + oneof destination { + // The BigQuery target dataset id. + string destination_dataset_id = 2; + } // User specified display name for the data transfer. string display_name = 3; @@ -147,23 +156,28 @@ message TransferConfig { bool disabled = 13; // Output only. Data transfer modification time. Ignored by server on input. - google.protobuf.Timestamp update_time = 4; + google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Next time when data transfer will run. - google.protobuf.Timestamp next_run_time = 8; + google.protobuf.Timestamp next_run_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. State of the most recently updated transfer run. - TransferState state = 10; + TransferState state = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; // Deprecated. Unique ID of the user on whose behalf transfer is done. int64 user_id = 11; // Output only. Region in which BigQuery dataset is located. - string dataset_region = 14; + string dataset_region = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Represents a data transfer run. message TransferRun { + option (google.api.resource) = { + type: "bigquerydatatransfer.googleapis.com/TransferRun" + pattern: "projects/{project}/locations/{location}/transferConfigs/{transfer_config}/runs/{run}" + }; + // The resource name of the transfer run. // Transfer run names have the form // `projects/{project_id}/locations/{location}/transferConfigs/{config_id}/runs/{run_id}`. @@ -182,23 +196,26 @@ message TransferRun { // Output only. Time when transfer run was started. // Parameter ignored by server for input requests. - google.protobuf.Timestamp start_time = 4; + google.protobuf.Timestamp start_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Time when transfer run ended. // Parameter ignored by server for input requests. - google.protobuf.Timestamp end_time = 5; + google.protobuf.Timestamp end_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Last time the data transfer run state was updated. - google.protobuf.Timestamp update_time = 6; + google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Data transfer specific parameters. - google.protobuf.Struct params = 9; + google.protobuf.Struct params = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The BigQuery target dataset id. - string destination_dataset_id = 2; + // Data transfer destination. + oneof destination { + // Output only. The BigQuery target dataset id. + string destination_dataset_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } // Output only. Data source id. - string data_source_id = 7; + string data_source_id = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; // Data transfer run state. Ignored for input requests. TransferState state = 8; @@ -211,7 +228,7 @@ message TransferRun { // scheduled manually, this is empty. // NOTE: the system might choose to delay the schedule depending on the // current load, so `schedule_time` doesn't always match this. - string schedule = 12; + string schedule = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Represents a user facing message for a particular data transfer run. diff --git a/packages/google-cloud-bigquery-datatransfer/protos/protos.d.ts b/packages/google-cloud-bigquery-datatransfer/protos/protos.d.ts new file mode 100644 index 00000000000..81ba40d59e7 --- /dev/null +++ b/packages/google-cloud-bigquery-datatransfer/protos/protos.d.ts @@ -0,0 +1,8840 @@ +import * as $protobuf from "protobufjs"; +/** Namespace google. */ +export namespace google { + + /** Namespace cloud. */ + namespace cloud { + + /** Namespace bigquery. */ + namespace bigquery { + + /** Namespace datatransfer. */ + namespace datatransfer { + + /** Namespace v1. */ + namespace v1 { + + /** Represents a DataTransferService */ + class DataTransferService extends $protobuf.rpc.Service { + + /** + * Constructs a new DataTransferService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new DataTransferService service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): DataTransferService; + + /** + * Calls GetDataSource. + * @param request GetDataSourceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataSource + */ + public getDataSource(request: google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest, callback: google.cloud.bigquery.datatransfer.v1.DataTransferService.GetDataSourceCallback): void; + + /** + * Calls GetDataSource. + * @param request GetDataSourceRequest message or plain object + * @returns Promise + */ + public getDataSource(request: google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest): Promise; + + /** + * Calls ListDataSources. + * @param request ListDataSourcesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDataSourcesResponse + */ + public listDataSources(request: google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest, callback: google.cloud.bigquery.datatransfer.v1.DataTransferService.ListDataSourcesCallback): void; + + /** + * Calls ListDataSources. + * @param request ListDataSourcesRequest message or plain object + * @returns Promise + */ + public listDataSources(request: google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest): Promise; + + /** + * Calls CreateTransferConfig. + * @param request CreateTransferConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TransferConfig + */ + public createTransferConfig(request: google.cloud.bigquery.datatransfer.v1.ICreateTransferConfigRequest, callback: google.cloud.bigquery.datatransfer.v1.DataTransferService.CreateTransferConfigCallback): void; + + /** + * Calls CreateTransferConfig. + * @param request CreateTransferConfigRequest message or plain object + * @returns Promise + */ + public createTransferConfig(request: google.cloud.bigquery.datatransfer.v1.ICreateTransferConfigRequest): Promise; + + /** + * Calls UpdateTransferConfig. + * @param request UpdateTransferConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TransferConfig + */ + public updateTransferConfig(request: google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest, callback: google.cloud.bigquery.datatransfer.v1.DataTransferService.UpdateTransferConfigCallback): void; + + /** + * Calls UpdateTransferConfig. + * @param request UpdateTransferConfigRequest message or plain object + * @returns Promise + */ + public updateTransferConfig(request: google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest): Promise; + + /** + * Calls DeleteTransferConfig. + * @param request DeleteTransferConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteTransferConfig(request: google.cloud.bigquery.datatransfer.v1.IDeleteTransferConfigRequest, callback: google.cloud.bigquery.datatransfer.v1.DataTransferService.DeleteTransferConfigCallback): void; + + /** + * Calls DeleteTransferConfig. + * @param request DeleteTransferConfigRequest message or plain object + * @returns Promise + */ + public deleteTransferConfig(request: google.cloud.bigquery.datatransfer.v1.IDeleteTransferConfigRequest): Promise; + + /** + * Calls GetTransferConfig. + * @param request GetTransferConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TransferConfig + */ + public getTransferConfig(request: google.cloud.bigquery.datatransfer.v1.IGetTransferConfigRequest, callback: google.cloud.bigquery.datatransfer.v1.DataTransferService.GetTransferConfigCallback): void; + + /** + * Calls GetTransferConfig. + * @param request GetTransferConfigRequest message or plain object + * @returns Promise + */ + public getTransferConfig(request: google.cloud.bigquery.datatransfer.v1.IGetTransferConfigRequest): Promise; + + /** + * Calls ListTransferConfigs. + * @param request ListTransferConfigsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListTransferConfigsResponse + */ + public listTransferConfigs(request: google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest, callback: google.cloud.bigquery.datatransfer.v1.DataTransferService.ListTransferConfigsCallback): void; + + /** + * Calls ListTransferConfigs. + * @param request ListTransferConfigsRequest message or plain object + * @returns Promise + */ + public listTransferConfigs(request: google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest): Promise; + + /** + * Calls ScheduleTransferRuns. + * @param request ScheduleTransferRunsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ScheduleTransferRunsResponse + */ + public scheduleTransferRuns(request: google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsRequest, callback: google.cloud.bigquery.datatransfer.v1.DataTransferService.ScheduleTransferRunsCallback): void; + + /** + * Calls ScheduleTransferRuns. + * @param request ScheduleTransferRunsRequest message or plain object + * @returns Promise + */ + public scheduleTransferRuns(request: google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsRequest): Promise; + + /** + * Calls StartManualTransferRuns. + * @param request StartManualTransferRunsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and StartManualTransferRunsResponse + */ + public startManualTransferRuns(request: google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest, callback: google.cloud.bigquery.datatransfer.v1.DataTransferService.StartManualTransferRunsCallback): void; + + /** + * Calls StartManualTransferRuns. + * @param request StartManualTransferRunsRequest message or plain object + * @returns Promise + */ + public startManualTransferRuns(request: google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest): Promise; + + /** + * Calls GetTransferRun. + * @param request GetTransferRunRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TransferRun + */ + public getTransferRun(request: google.cloud.bigquery.datatransfer.v1.IGetTransferRunRequest, callback: google.cloud.bigquery.datatransfer.v1.DataTransferService.GetTransferRunCallback): void; + + /** + * Calls GetTransferRun. + * @param request GetTransferRunRequest message or plain object + * @returns Promise + */ + public getTransferRun(request: google.cloud.bigquery.datatransfer.v1.IGetTransferRunRequest): Promise; + + /** + * Calls DeleteTransferRun. + * @param request DeleteTransferRunRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteTransferRun(request: google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest, callback: google.cloud.bigquery.datatransfer.v1.DataTransferService.DeleteTransferRunCallback): void; + + /** + * Calls DeleteTransferRun. + * @param request DeleteTransferRunRequest message or plain object + * @returns Promise + */ + public deleteTransferRun(request: google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest): Promise; + + /** + * Calls ListTransferRuns. + * @param request ListTransferRunsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListTransferRunsResponse + */ + public listTransferRuns(request: google.cloud.bigquery.datatransfer.v1.IListTransferRunsRequest, callback: google.cloud.bigquery.datatransfer.v1.DataTransferService.ListTransferRunsCallback): void; + + /** + * Calls ListTransferRuns. + * @param request ListTransferRunsRequest message or plain object + * @returns Promise + */ + public listTransferRuns(request: google.cloud.bigquery.datatransfer.v1.IListTransferRunsRequest): Promise; + + /** + * Calls ListTransferLogs. + * @param request ListTransferLogsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListTransferLogsResponse + */ + public listTransferLogs(request: google.cloud.bigquery.datatransfer.v1.IListTransferLogsRequest, callback: google.cloud.bigquery.datatransfer.v1.DataTransferService.ListTransferLogsCallback): void; + + /** + * Calls ListTransferLogs. + * @param request ListTransferLogsRequest message or plain object + * @returns Promise + */ + public listTransferLogs(request: google.cloud.bigquery.datatransfer.v1.IListTransferLogsRequest): Promise; + + /** + * Calls CheckValidCreds. + * @param request CheckValidCredsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CheckValidCredsResponse + */ + public checkValidCreds(request: google.cloud.bigquery.datatransfer.v1.ICheckValidCredsRequest, callback: google.cloud.bigquery.datatransfer.v1.DataTransferService.CheckValidCredsCallback): void; + + /** + * Calls CheckValidCreds. + * @param request CheckValidCredsRequest message or plain object + * @returns Promise + */ + public checkValidCreds(request: google.cloud.bigquery.datatransfer.v1.ICheckValidCredsRequest): Promise; + } + + namespace DataTransferService { + + /** + * Callback as used by {@link google.cloud.bigquery.datatransfer.v1.DataTransferService#getDataSource}. + * @param error Error, if any + * @param [response] DataSource + */ + type GetDataSourceCallback = (error: (Error|null), response?: google.cloud.bigquery.datatransfer.v1.DataSource) => void; + + /** + * Callback as used by {@link google.cloud.bigquery.datatransfer.v1.DataTransferService#listDataSources}. + * @param error Error, if any + * @param [response] ListDataSourcesResponse + */ + type ListDataSourcesCallback = (error: (Error|null), response?: google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse) => void; + + /** + * Callback as used by {@link google.cloud.bigquery.datatransfer.v1.DataTransferService#createTransferConfig}. + * @param error Error, if any + * @param [response] TransferConfig + */ + type CreateTransferConfigCallback = (error: (Error|null), response?: google.cloud.bigquery.datatransfer.v1.TransferConfig) => void; + + /** + * Callback as used by {@link google.cloud.bigquery.datatransfer.v1.DataTransferService#updateTransferConfig}. + * @param error Error, if any + * @param [response] TransferConfig + */ + type UpdateTransferConfigCallback = (error: (Error|null), response?: google.cloud.bigquery.datatransfer.v1.TransferConfig) => void; + + /** + * Callback as used by {@link google.cloud.bigquery.datatransfer.v1.DataTransferService#deleteTransferConfig}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteTransferConfigCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.bigquery.datatransfer.v1.DataTransferService#getTransferConfig}. + * @param error Error, if any + * @param [response] TransferConfig + */ + type GetTransferConfigCallback = (error: (Error|null), response?: google.cloud.bigquery.datatransfer.v1.TransferConfig) => void; + + /** + * Callback as used by {@link google.cloud.bigquery.datatransfer.v1.DataTransferService#listTransferConfigs}. + * @param error Error, if any + * @param [response] ListTransferConfigsResponse + */ + type ListTransferConfigsCallback = (error: (Error|null), response?: google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse) => void; + + /** + * Callback as used by {@link google.cloud.bigquery.datatransfer.v1.DataTransferService#scheduleTransferRuns}. + * @param error Error, if any + * @param [response] ScheduleTransferRunsResponse + */ + type ScheduleTransferRunsCallback = (error: (Error|null), response?: google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse) => void; + + /** + * Callback as used by {@link google.cloud.bigquery.datatransfer.v1.DataTransferService#startManualTransferRuns}. + * @param error Error, if any + * @param [response] StartManualTransferRunsResponse + */ + type StartManualTransferRunsCallback = (error: (Error|null), response?: google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse) => void; + + /** + * Callback as used by {@link google.cloud.bigquery.datatransfer.v1.DataTransferService#getTransferRun}. + * @param error Error, if any + * @param [response] TransferRun + */ + type GetTransferRunCallback = (error: (Error|null), response?: google.cloud.bigquery.datatransfer.v1.TransferRun) => void; + + /** + * Callback as used by {@link google.cloud.bigquery.datatransfer.v1.DataTransferService#deleteTransferRun}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteTransferRunCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.bigquery.datatransfer.v1.DataTransferService#listTransferRuns}. + * @param error Error, if any + * @param [response] ListTransferRunsResponse + */ + type ListTransferRunsCallback = (error: (Error|null), response?: google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse) => void; + + /** + * Callback as used by {@link google.cloud.bigquery.datatransfer.v1.DataTransferService#listTransferLogs}. + * @param error Error, if any + * @param [response] ListTransferLogsResponse + */ + type ListTransferLogsCallback = (error: (Error|null), response?: google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse) => void; + + /** + * Callback as used by {@link google.cloud.bigquery.datatransfer.v1.DataTransferService#checkValidCreds}. + * @param error Error, if any + * @param [response] CheckValidCredsResponse + */ + type CheckValidCredsCallback = (error: (Error|null), response?: google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse) => void; + } + + /** Properties of a DataSourceParameter. */ + interface IDataSourceParameter { + + /** DataSourceParameter paramId */ + paramId?: (string|null); + + /** DataSourceParameter displayName */ + displayName?: (string|null); + + /** DataSourceParameter description */ + description?: (string|null); + + /** DataSourceParameter type */ + type?: (google.cloud.bigquery.datatransfer.v1.DataSourceParameter.Type|null); + + /** DataSourceParameter required */ + required?: (boolean|null); + + /** DataSourceParameter repeated */ + repeated?: (boolean|null); + + /** DataSourceParameter validationRegex */ + validationRegex?: (string|null); + + /** DataSourceParameter allowedValues */ + allowedValues?: (string[]|null); + + /** DataSourceParameter minValue */ + minValue?: (google.protobuf.IDoubleValue|null); + + /** DataSourceParameter maxValue */ + maxValue?: (google.protobuf.IDoubleValue|null); + + /** DataSourceParameter fields */ + fields?: (google.cloud.bigquery.datatransfer.v1.IDataSourceParameter[]|null); + + /** DataSourceParameter validationDescription */ + validationDescription?: (string|null); + + /** DataSourceParameter validationHelpUrl */ + validationHelpUrl?: (string|null); + + /** DataSourceParameter immutable */ + immutable?: (boolean|null); + + /** DataSourceParameter recurse */ + recurse?: (boolean|null); + + /** DataSourceParameter deprecated */ + deprecated?: (boolean|null); + } + + /** Represents a DataSourceParameter. */ + class DataSourceParameter implements IDataSourceParameter { + + /** + * Constructs a new DataSourceParameter. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datatransfer.v1.IDataSourceParameter); + + /** DataSourceParameter paramId. */ + public paramId: string; + + /** DataSourceParameter displayName. */ + public displayName: string; + + /** DataSourceParameter description. */ + public description: string; + + /** DataSourceParameter type. */ + public type: google.cloud.bigquery.datatransfer.v1.DataSourceParameter.Type; + + /** DataSourceParameter required. */ + public required: boolean; + + /** DataSourceParameter repeated. */ + public repeated: boolean; + + /** DataSourceParameter validationRegex. */ + public validationRegex: string; + + /** DataSourceParameter allowedValues. */ + public allowedValues: string[]; + + /** DataSourceParameter minValue. */ + public minValue?: (google.protobuf.IDoubleValue|null); + + /** DataSourceParameter maxValue. */ + public maxValue?: (google.protobuf.IDoubleValue|null); + + /** DataSourceParameter fields. */ + public fields: google.cloud.bigquery.datatransfer.v1.IDataSourceParameter[]; + + /** DataSourceParameter validationDescription. */ + public validationDescription: string; + + /** DataSourceParameter validationHelpUrl. */ + public validationHelpUrl: string; + + /** DataSourceParameter immutable. */ + public immutable: boolean; + + /** DataSourceParameter recurse. */ + public recurse: boolean; + + /** DataSourceParameter deprecated. */ + public deprecated: boolean; + + /** + * Creates a new DataSourceParameter instance using the specified properties. + * @param [properties] Properties to set + * @returns DataSourceParameter instance + */ + public static create(properties?: google.cloud.bigquery.datatransfer.v1.IDataSourceParameter): google.cloud.bigquery.datatransfer.v1.DataSourceParameter; + + /** + * Encodes the specified DataSourceParameter message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.DataSourceParameter.verify|verify} messages. + * @param message DataSourceParameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datatransfer.v1.IDataSourceParameter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataSourceParameter message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.DataSourceParameter.verify|verify} messages. + * @param message DataSourceParameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datatransfer.v1.IDataSourceParameter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataSourceParameter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataSourceParameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datatransfer.v1.DataSourceParameter; + + /** + * Decodes a DataSourceParameter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataSourceParameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datatransfer.v1.DataSourceParameter; + + /** + * Verifies a DataSourceParameter 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 DataSourceParameter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataSourceParameter + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datatransfer.v1.DataSourceParameter; + + /** + * Creates a plain object from a DataSourceParameter message. Also converts values to other types if specified. + * @param message DataSourceParameter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datatransfer.v1.DataSourceParameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataSourceParameter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DataSourceParameter { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + STRING = 1, + INTEGER = 2, + DOUBLE = 3, + BOOLEAN = 4, + RECORD = 5, + PLUS_PAGE = 6 + } + } + + /** Properties of a DataSource. */ + interface IDataSource { + + /** DataSource name */ + name?: (string|null); + + /** DataSource dataSourceId */ + dataSourceId?: (string|null); + + /** DataSource displayName */ + displayName?: (string|null); + + /** DataSource description */ + description?: (string|null); + + /** DataSource clientId */ + clientId?: (string|null); + + /** DataSource scopes */ + scopes?: (string[]|null); + + /** DataSource transferType */ + transferType?: (google.cloud.bigquery.datatransfer.v1.TransferType|null); + + /** DataSource supportsMultipleTransfers */ + supportsMultipleTransfers?: (boolean|null); + + /** DataSource updateDeadlineSeconds */ + updateDeadlineSeconds?: (number|null); + + /** DataSource defaultSchedule */ + defaultSchedule?: (string|null); + + /** DataSource supportsCustomSchedule */ + supportsCustomSchedule?: (boolean|null); + + /** DataSource parameters */ + parameters?: (google.cloud.bigquery.datatransfer.v1.IDataSourceParameter[]|null); + + /** DataSource helpUrl */ + helpUrl?: (string|null); + + /** DataSource authorizationType */ + authorizationType?: (google.cloud.bigquery.datatransfer.v1.DataSource.AuthorizationType|null); + + /** DataSource dataRefreshType */ + dataRefreshType?: (google.cloud.bigquery.datatransfer.v1.DataSource.DataRefreshType|null); + + /** DataSource defaultDataRefreshWindowDays */ + defaultDataRefreshWindowDays?: (number|null); + + /** DataSource manualRunsDisabled */ + manualRunsDisabled?: (boolean|null); + + /** DataSource minimumScheduleInterval */ + minimumScheduleInterval?: (google.protobuf.IDuration|null); + } + + /** Represents a DataSource. */ + class DataSource implements IDataSource { + + /** + * Constructs a new DataSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datatransfer.v1.IDataSource); + + /** DataSource name. */ + public name: string; + + /** DataSource dataSourceId. */ + public dataSourceId: string; + + /** DataSource displayName. */ + public displayName: string; + + /** DataSource description. */ + public description: string; + + /** DataSource clientId. */ + public clientId: string; + + /** DataSource scopes. */ + public scopes: string[]; + + /** DataSource transferType. */ + public transferType: google.cloud.bigquery.datatransfer.v1.TransferType; + + /** DataSource supportsMultipleTransfers. */ + public supportsMultipleTransfers: boolean; + + /** DataSource updateDeadlineSeconds. */ + public updateDeadlineSeconds: number; + + /** DataSource defaultSchedule. */ + public defaultSchedule: string; + + /** DataSource supportsCustomSchedule. */ + public supportsCustomSchedule: boolean; + + /** DataSource parameters. */ + public parameters: google.cloud.bigquery.datatransfer.v1.IDataSourceParameter[]; + + /** DataSource helpUrl. */ + public helpUrl: string; + + /** DataSource authorizationType. */ + public authorizationType: google.cloud.bigquery.datatransfer.v1.DataSource.AuthorizationType; + + /** DataSource dataRefreshType. */ + public dataRefreshType: google.cloud.bigquery.datatransfer.v1.DataSource.DataRefreshType; + + /** DataSource defaultDataRefreshWindowDays. */ + public defaultDataRefreshWindowDays: number; + + /** DataSource manualRunsDisabled. */ + public manualRunsDisabled: boolean; + + /** DataSource minimumScheduleInterval. */ + public minimumScheduleInterval?: (google.protobuf.IDuration|null); + + /** + * Creates a new DataSource instance using the specified properties. + * @param [properties] Properties to set + * @returns DataSource instance + */ + public static create(properties?: google.cloud.bigquery.datatransfer.v1.IDataSource): google.cloud.bigquery.datatransfer.v1.DataSource; + + /** + * Encodes the specified DataSource message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.DataSource.verify|verify} messages. + * @param message DataSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datatransfer.v1.IDataSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataSource message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.DataSource.verify|verify} messages. + * @param message DataSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datatransfer.v1.IDataSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datatransfer.v1.DataSource; + + /** + * Decodes a DataSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datatransfer.v1.DataSource; + + /** + * Verifies a DataSource 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 DataSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataSource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datatransfer.v1.DataSource; + + /** + * Creates a plain object from a DataSource message. Also converts values to other types if specified. + * @param message DataSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datatransfer.v1.DataSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DataSource { + + /** AuthorizationType enum. */ + enum AuthorizationType { + AUTHORIZATION_TYPE_UNSPECIFIED = 0, + AUTHORIZATION_CODE = 1, + GOOGLE_PLUS_AUTHORIZATION_CODE = 2 + } + + /** DataRefreshType enum. */ + enum DataRefreshType { + DATA_REFRESH_TYPE_UNSPECIFIED = 0, + SLIDING_WINDOW = 1, + CUSTOM_SLIDING_WINDOW = 2 + } + } + + /** Properties of a GetDataSourceRequest. */ + interface IGetDataSourceRequest { + + /** GetDataSourceRequest name */ + name?: (string|null); + } + + /** Represents a GetDataSourceRequest. */ + class GetDataSourceRequest implements IGetDataSourceRequest { + + /** + * Constructs a new GetDataSourceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest); + + /** GetDataSourceRequest name. */ + public name: string; + + /** + * Creates a new GetDataSourceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDataSourceRequest instance + */ + public static create(properties?: google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest): google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest; + + /** + * Encodes the specified GetDataSourceRequest message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest.verify|verify} messages. + * @param message GetDataSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest.verify|verify} messages. + * @param message GetDataSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDataSourceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest; + + /** + * Decodes a GetDataSourceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest; + + /** + * Verifies a GetDataSourceRequest 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 GetDataSourceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDataSourceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest; + + /** + * Creates a plain object from a GetDataSourceRequest message. Also converts values to other types if specified. + * @param message GetDataSourceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDataSourceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListDataSourcesRequest. */ + interface IListDataSourcesRequest { + + /** ListDataSourcesRequest parent */ + parent?: (string|null); + + /** ListDataSourcesRequest pageToken */ + pageToken?: (string|null); + + /** ListDataSourcesRequest pageSize */ + pageSize?: (number|null); + } + + /** Represents a ListDataSourcesRequest. */ + class ListDataSourcesRequest implements IListDataSourcesRequest { + + /** + * Constructs a new ListDataSourcesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest); + + /** ListDataSourcesRequest parent. */ + public parent: string; + + /** ListDataSourcesRequest pageToken. */ + public pageToken: string; + + /** ListDataSourcesRequest pageSize. */ + public pageSize: number; + + /** + * Creates a new ListDataSourcesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataSourcesRequest instance + */ + public static create(properties?: google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest): google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest; + + /** + * Encodes the specified ListDataSourcesRequest message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest.verify|verify} messages. + * @param message ListDataSourcesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataSourcesRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest.verify|verify} messages. + * @param message ListDataSourcesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataSourcesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataSourcesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest; + + /** + * Decodes a ListDataSourcesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataSourcesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest; + + /** + * Verifies a ListDataSourcesRequest 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 ListDataSourcesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataSourcesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest; + + /** + * Creates a plain object from a ListDataSourcesRequest message. Also converts values to other types if specified. + * @param message ListDataSourcesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataSourcesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListDataSourcesResponse. */ + interface IListDataSourcesResponse { + + /** ListDataSourcesResponse dataSources */ + dataSources?: (google.cloud.bigquery.datatransfer.v1.IDataSource[]|null); + + /** ListDataSourcesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListDataSourcesResponse. */ + class ListDataSourcesResponse implements IListDataSourcesResponse { + + /** + * Constructs a new ListDataSourcesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datatransfer.v1.IListDataSourcesResponse); + + /** ListDataSourcesResponse dataSources. */ + public dataSources: google.cloud.bigquery.datatransfer.v1.IDataSource[]; + + /** ListDataSourcesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListDataSourcesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataSourcesResponse instance + */ + public static create(properties?: google.cloud.bigquery.datatransfer.v1.IListDataSourcesResponse): google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse; + + /** + * Encodes the specified ListDataSourcesResponse message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse.verify|verify} messages. + * @param message ListDataSourcesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datatransfer.v1.IListDataSourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataSourcesResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse.verify|verify} messages. + * @param message ListDataSourcesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datatransfer.v1.IListDataSourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataSourcesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataSourcesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse; + + /** + * Decodes a ListDataSourcesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataSourcesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse; + + /** + * Verifies a ListDataSourcesResponse 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 ListDataSourcesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataSourcesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse; + + /** + * Creates a plain object from a ListDataSourcesResponse message. Also converts values to other types if specified. + * @param message ListDataSourcesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataSourcesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateTransferConfigRequest. */ + interface ICreateTransferConfigRequest { + + /** CreateTransferConfigRequest parent */ + parent?: (string|null); + + /** CreateTransferConfigRequest transferConfig */ + transferConfig?: (google.cloud.bigquery.datatransfer.v1.ITransferConfig|null); + + /** CreateTransferConfigRequest authorizationCode */ + authorizationCode?: (string|null); + + /** CreateTransferConfigRequest versionInfo */ + versionInfo?: (string|null); + } + + /** Represents a CreateTransferConfigRequest. */ + class CreateTransferConfigRequest implements ICreateTransferConfigRequest { + + /** + * Constructs a new CreateTransferConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datatransfer.v1.ICreateTransferConfigRequest); + + /** CreateTransferConfigRequest parent. */ + public parent: string; + + /** CreateTransferConfigRequest transferConfig. */ + public transferConfig?: (google.cloud.bigquery.datatransfer.v1.ITransferConfig|null); + + /** CreateTransferConfigRequest authorizationCode. */ + public authorizationCode: string; + + /** CreateTransferConfigRequest versionInfo. */ + public versionInfo: string; + + /** + * Creates a new CreateTransferConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateTransferConfigRequest instance + */ + public static create(properties?: google.cloud.bigquery.datatransfer.v1.ICreateTransferConfigRequest): google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest; + + /** + * Encodes the specified CreateTransferConfigRequest message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest.verify|verify} messages. + * @param message CreateTransferConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datatransfer.v1.ICreateTransferConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateTransferConfigRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest.verify|verify} messages. + * @param message CreateTransferConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datatransfer.v1.ICreateTransferConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateTransferConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateTransferConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest; + + /** + * Decodes a CreateTransferConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateTransferConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest; + + /** + * Verifies a CreateTransferConfigRequest 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 CreateTransferConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateTransferConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest; + + /** + * Creates a plain object from a CreateTransferConfigRequest message. Also converts values to other types if specified. + * @param message CreateTransferConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateTransferConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateTransferConfigRequest. */ + interface IUpdateTransferConfigRequest { + + /** UpdateTransferConfigRequest transferConfig */ + transferConfig?: (google.cloud.bigquery.datatransfer.v1.ITransferConfig|null); + + /** UpdateTransferConfigRequest authorizationCode */ + authorizationCode?: (string|null); + + /** UpdateTransferConfigRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateTransferConfigRequest versionInfo */ + versionInfo?: (string|null); + } + + /** Represents an UpdateTransferConfigRequest. */ + class UpdateTransferConfigRequest implements IUpdateTransferConfigRequest { + + /** + * Constructs a new UpdateTransferConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest); + + /** UpdateTransferConfigRequest transferConfig. */ + public transferConfig?: (google.cloud.bigquery.datatransfer.v1.ITransferConfig|null); + + /** UpdateTransferConfigRequest authorizationCode. */ + public authorizationCode: string; + + /** UpdateTransferConfigRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateTransferConfigRequest versionInfo. */ + public versionInfo: string; + + /** + * Creates a new UpdateTransferConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateTransferConfigRequest instance + */ + public static create(properties?: google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest): google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest; + + /** + * Encodes the specified UpdateTransferConfigRequest message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest.verify|verify} messages. + * @param message UpdateTransferConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateTransferConfigRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest.verify|verify} messages. + * @param message UpdateTransferConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateTransferConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateTransferConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest; + + /** + * Decodes an UpdateTransferConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateTransferConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest; + + /** + * Verifies an UpdateTransferConfigRequest 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 UpdateTransferConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateTransferConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest; + + /** + * Creates a plain object from an UpdateTransferConfigRequest message. Also converts values to other types if specified. + * @param message UpdateTransferConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateTransferConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetTransferConfigRequest. */ + interface IGetTransferConfigRequest { + + /** GetTransferConfigRequest name */ + name?: (string|null); + } + + /** Represents a GetTransferConfigRequest. */ + class GetTransferConfigRequest implements IGetTransferConfigRequest { + + /** + * Constructs a new GetTransferConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datatransfer.v1.IGetTransferConfigRequest); + + /** GetTransferConfigRequest name. */ + public name: string; + + /** + * Creates a new GetTransferConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetTransferConfigRequest instance + */ + public static create(properties?: google.cloud.bigquery.datatransfer.v1.IGetTransferConfigRequest): google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest; + + /** + * Encodes the specified GetTransferConfigRequest message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest.verify|verify} messages. + * @param message GetTransferConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datatransfer.v1.IGetTransferConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetTransferConfigRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest.verify|verify} messages. + * @param message GetTransferConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datatransfer.v1.IGetTransferConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetTransferConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetTransferConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest; + + /** + * Decodes a GetTransferConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetTransferConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest; + + /** + * Verifies a GetTransferConfigRequest 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 GetTransferConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetTransferConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest; + + /** + * Creates a plain object from a GetTransferConfigRequest message. Also converts values to other types if specified. + * @param message GetTransferConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetTransferConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteTransferConfigRequest. */ + interface IDeleteTransferConfigRequest { + + /** DeleteTransferConfigRequest name */ + name?: (string|null); + } + + /** Represents a DeleteTransferConfigRequest. */ + class DeleteTransferConfigRequest implements IDeleteTransferConfigRequest { + + /** + * Constructs a new DeleteTransferConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datatransfer.v1.IDeleteTransferConfigRequest); + + /** DeleteTransferConfigRequest name. */ + public name: string; + + /** + * Creates a new DeleteTransferConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteTransferConfigRequest instance + */ + public static create(properties?: google.cloud.bigquery.datatransfer.v1.IDeleteTransferConfigRequest): google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest; + + /** + * Encodes the specified DeleteTransferConfigRequest message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest.verify|verify} messages. + * @param message DeleteTransferConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datatransfer.v1.IDeleteTransferConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteTransferConfigRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest.verify|verify} messages. + * @param message DeleteTransferConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datatransfer.v1.IDeleteTransferConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteTransferConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteTransferConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest; + + /** + * Decodes a DeleteTransferConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteTransferConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest; + + /** + * Verifies a DeleteTransferConfigRequest 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 DeleteTransferConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteTransferConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest; + + /** + * Creates a plain object from a DeleteTransferConfigRequest message. Also converts values to other types if specified. + * @param message DeleteTransferConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteTransferConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetTransferRunRequest. */ + interface IGetTransferRunRequest { + + /** GetTransferRunRequest name */ + name?: (string|null); + } + + /** Represents a GetTransferRunRequest. */ + class GetTransferRunRequest implements IGetTransferRunRequest { + + /** + * Constructs a new GetTransferRunRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datatransfer.v1.IGetTransferRunRequest); + + /** GetTransferRunRequest name. */ + public name: string; + + /** + * Creates a new GetTransferRunRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetTransferRunRequest instance + */ + public static create(properties?: google.cloud.bigquery.datatransfer.v1.IGetTransferRunRequest): google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest; + + /** + * Encodes the specified GetTransferRunRequest message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest.verify|verify} messages. + * @param message GetTransferRunRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datatransfer.v1.IGetTransferRunRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetTransferRunRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest.verify|verify} messages. + * @param message GetTransferRunRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datatransfer.v1.IGetTransferRunRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetTransferRunRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetTransferRunRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest; + + /** + * Decodes a GetTransferRunRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetTransferRunRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest; + + /** + * Verifies a GetTransferRunRequest 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 GetTransferRunRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetTransferRunRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest; + + /** + * Creates a plain object from a GetTransferRunRequest message. Also converts values to other types if specified. + * @param message GetTransferRunRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetTransferRunRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteTransferRunRequest. */ + interface IDeleteTransferRunRequest { + + /** DeleteTransferRunRequest name */ + name?: (string|null); + } + + /** Represents a DeleteTransferRunRequest. */ + class DeleteTransferRunRequest implements IDeleteTransferRunRequest { + + /** + * Constructs a new DeleteTransferRunRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest); + + /** DeleteTransferRunRequest name. */ + public name: string; + + /** + * Creates a new DeleteTransferRunRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteTransferRunRequest instance + */ + public static create(properties?: google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest): google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest; + + /** + * Encodes the specified DeleteTransferRunRequest message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest.verify|verify} messages. + * @param message DeleteTransferRunRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteTransferRunRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest.verify|verify} messages. + * @param message DeleteTransferRunRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteTransferRunRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteTransferRunRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest; + + /** + * Decodes a DeleteTransferRunRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteTransferRunRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest; + + /** + * Verifies a DeleteTransferRunRequest 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 DeleteTransferRunRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteTransferRunRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest; + + /** + * Creates a plain object from a DeleteTransferRunRequest message. Also converts values to other types if specified. + * @param message DeleteTransferRunRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteTransferRunRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListTransferConfigsRequest. */ + interface IListTransferConfigsRequest { + + /** ListTransferConfigsRequest parent */ + parent?: (string|null); + + /** ListTransferConfigsRequest dataSourceIds */ + dataSourceIds?: (string[]|null); + + /** ListTransferConfigsRequest pageToken */ + pageToken?: (string|null); + + /** ListTransferConfigsRequest pageSize */ + pageSize?: (number|null); + } + + /** Represents a ListTransferConfigsRequest. */ + class ListTransferConfigsRequest implements IListTransferConfigsRequest { + + /** + * Constructs a new ListTransferConfigsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest); + + /** ListTransferConfigsRequest parent. */ + public parent: string; + + /** ListTransferConfigsRequest dataSourceIds. */ + public dataSourceIds: string[]; + + /** ListTransferConfigsRequest pageToken. */ + public pageToken: string; + + /** ListTransferConfigsRequest pageSize. */ + public pageSize: number; + + /** + * Creates a new ListTransferConfigsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTransferConfigsRequest instance + */ + public static create(properties?: google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest): google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest; + + /** + * Encodes the specified ListTransferConfigsRequest message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest.verify|verify} messages. + * @param message ListTransferConfigsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTransferConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest.verify|verify} messages. + * @param message ListTransferConfigsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTransferConfigsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTransferConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest; + + /** + * Decodes a ListTransferConfigsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTransferConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest; + + /** + * Verifies a ListTransferConfigsRequest 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 ListTransferConfigsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTransferConfigsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest; + + /** + * Creates a plain object from a ListTransferConfigsRequest message. Also converts values to other types if specified. + * @param message ListTransferConfigsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTransferConfigsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListTransferConfigsResponse. */ + interface IListTransferConfigsResponse { + + /** ListTransferConfigsResponse transferConfigs */ + transferConfigs?: (google.cloud.bigquery.datatransfer.v1.ITransferConfig[]|null); + + /** ListTransferConfigsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListTransferConfigsResponse. */ + class ListTransferConfigsResponse implements IListTransferConfigsResponse { + + /** + * Constructs a new ListTransferConfigsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datatransfer.v1.IListTransferConfigsResponse); + + /** ListTransferConfigsResponse transferConfigs. */ + public transferConfigs: google.cloud.bigquery.datatransfer.v1.ITransferConfig[]; + + /** ListTransferConfigsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListTransferConfigsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTransferConfigsResponse instance + */ + public static create(properties?: google.cloud.bigquery.datatransfer.v1.IListTransferConfigsResponse): google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse; + + /** + * Encodes the specified ListTransferConfigsResponse message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse.verify|verify} messages. + * @param message ListTransferConfigsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datatransfer.v1.IListTransferConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTransferConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse.verify|verify} messages. + * @param message ListTransferConfigsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datatransfer.v1.IListTransferConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTransferConfigsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTransferConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse; + + /** + * Decodes a ListTransferConfigsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTransferConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse; + + /** + * Verifies a ListTransferConfigsResponse 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 ListTransferConfigsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTransferConfigsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse; + + /** + * Creates a plain object from a ListTransferConfigsResponse message. Also converts values to other types if specified. + * @param message ListTransferConfigsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTransferConfigsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListTransferRunsRequest. */ + interface IListTransferRunsRequest { + + /** ListTransferRunsRequest parent */ + parent?: (string|null); + + /** ListTransferRunsRequest states */ + states?: (google.cloud.bigquery.datatransfer.v1.TransferState[]|null); + + /** ListTransferRunsRequest pageToken */ + pageToken?: (string|null); + + /** ListTransferRunsRequest pageSize */ + pageSize?: (number|null); + + /** ListTransferRunsRequest runAttempt */ + runAttempt?: (google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest.RunAttempt|null); + } + + /** Represents a ListTransferRunsRequest. */ + class ListTransferRunsRequest implements IListTransferRunsRequest { + + /** + * Constructs a new ListTransferRunsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datatransfer.v1.IListTransferRunsRequest); + + /** ListTransferRunsRequest parent. */ + public parent: string; + + /** ListTransferRunsRequest states. */ + public states: google.cloud.bigquery.datatransfer.v1.TransferState[]; + + /** ListTransferRunsRequest pageToken. */ + public pageToken: string; + + /** ListTransferRunsRequest pageSize. */ + public pageSize: number; + + /** ListTransferRunsRequest runAttempt. */ + public runAttempt: google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest.RunAttempt; + + /** + * Creates a new ListTransferRunsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTransferRunsRequest instance + */ + public static create(properties?: google.cloud.bigquery.datatransfer.v1.IListTransferRunsRequest): google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest; + + /** + * Encodes the specified ListTransferRunsRequest message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest.verify|verify} messages. + * @param message ListTransferRunsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datatransfer.v1.IListTransferRunsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTransferRunsRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest.verify|verify} messages. + * @param message ListTransferRunsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datatransfer.v1.IListTransferRunsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTransferRunsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTransferRunsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest; + + /** + * Decodes a ListTransferRunsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTransferRunsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest; + + /** + * Verifies a ListTransferRunsRequest 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 ListTransferRunsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTransferRunsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest; + + /** + * Creates a plain object from a ListTransferRunsRequest message. Also converts values to other types if specified. + * @param message ListTransferRunsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTransferRunsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ListTransferRunsRequest { + + /** RunAttempt enum. */ + enum RunAttempt { + RUN_ATTEMPT_UNSPECIFIED = 0, + LATEST = 1 + } + } + + /** Properties of a ListTransferRunsResponse. */ + interface IListTransferRunsResponse { + + /** ListTransferRunsResponse transferRuns */ + transferRuns?: (google.cloud.bigquery.datatransfer.v1.ITransferRun[]|null); + + /** ListTransferRunsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListTransferRunsResponse. */ + class ListTransferRunsResponse implements IListTransferRunsResponse { + + /** + * Constructs a new ListTransferRunsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datatransfer.v1.IListTransferRunsResponse); + + /** ListTransferRunsResponse transferRuns. */ + public transferRuns: google.cloud.bigquery.datatransfer.v1.ITransferRun[]; + + /** ListTransferRunsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListTransferRunsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTransferRunsResponse instance + */ + public static create(properties?: google.cloud.bigquery.datatransfer.v1.IListTransferRunsResponse): google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse; + + /** + * Encodes the specified ListTransferRunsResponse message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse.verify|verify} messages. + * @param message ListTransferRunsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datatransfer.v1.IListTransferRunsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTransferRunsResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse.verify|verify} messages. + * @param message ListTransferRunsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datatransfer.v1.IListTransferRunsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTransferRunsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTransferRunsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse; + + /** + * Decodes a ListTransferRunsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTransferRunsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse; + + /** + * Verifies a ListTransferRunsResponse 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 ListTransferRunsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTransferRunsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse; + + /** + * Creates a plain object from a ListTransferRunsResponse message. Also converts values to other types if specified. + * @param message ListTransferRunsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTransferRunsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListTransferLogsRequest. */ + interface IListTransferLogsRequest { + + /** ListTransferLogsRequest parent */ + parent?: (string|null); + + /** ListTransferLogsRequest pageToken */ + pageToken?: (string|null); + + /** ListTransferLogsRequest pageSize */ + pageSize?: (number|null); + + /** ListTransferLogsRequest messageTypes */ + messageTypes?: (google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity[]|null); + } + + /** Represents a ListTransferLogsRequest. */ + class ListTransferLogsRequest implements IListTransferLogsRequest { + + /** + * Constructs a new ListTransferLogsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datatransfer.v1.IListTransferLogsRequest); + + /** ListTransferLogsRequest parent. */ + public parent: string; + + /** ListTransferLogsRequest pageToken. */ + public pageToken: string; + + /** ListTransferLogsRequest pageSize. */ + public pageSize: number; + + /** ListTransferLogsRequest messageTypes. */ + public messageTypes: google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity[]; + + /** + * Creates a new ListTransferLogsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTransferLogsRequest instance + */ + public static create(properties?: google.cloud.bigquery.datatransfer.v1.IListTransferLogsRequest): google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest; + + /** + * Encodes the specified ListTransferLogsRequest message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest.verify|verify} messages. + * @param message ListTransferLogsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datatransfer.v1.IListTransferLogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTransferLogsRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest.verify|verify} messages. + * @param message ListTransferLogsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datatransfer.v1.IListTransferLogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTransferLogsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTransferLogsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest; + + /** + * Decodes a ListTransferLogsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTransferLogsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest; + + /** + * Verifies a ListTransferLogsRequest 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 ListTransferLogsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTransferLogsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest; + + /** + * Creates a plain object from a ListTransferLogsRequest message. Also converts values to other types if specified. + * @param message ListTransferLogsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTransferLogsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListTransferLogsResponse. */ + interface IListTransferLogsResponse { + + /** ListTransferLogsResponse transferMessages */ + transferMessages?: (google.cloud.bigquery.datatransfer.v1.ITransferMessage[]|null); + + /** ListTransferLogsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListTransferLogsResponse. */ + class ListTransferLogsResponse implements IListTransferLogsResponse { + + /** + * Constructs a new ListTransferLogsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datatransfer.v1.IListTransferLogsResponse); + + /** ListTransferLogsResponse transferMessages. */ + public transferMessages: google.cloud.bigquery.datatransfer.v1.ITransferMessage[]; + + /** ListTransferLogsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListTransferLogsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTransferLogsResponse instance + */ + public static create(properties?: google.cloud.bigquery.datatransfer.v1.IListTransferLogsResponse): google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse; + + /** + * Encodes the specified ListTransferLogsResponse message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse.verify|verify} messages. + * @param message ListTransferLogsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datatransfer.v1.IListTransferLogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTransferLogsResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse.verify|verify} messages. + * @param message ListTransferLogsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datatransfer.v1.IListTransferLogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTransferLogsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTransferLogsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse; + + /** + * Decodes a ListTransferLogsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTransferLogsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse; + + /** + * Verifies a ListTransferLogsResponse 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 ListTransferLogsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTransferLogsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse; + + /** + * Creates a plain object from a ListTransferLogsResponse message. Also converts values to other types if specified. + * @param message ListTransferLogsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTransferLogsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CheckValidCredsRequest. */ + interface ICheckValidCredsRequest { + + /** CheckValidCredsRequest name */ + name?: (string|null); + } + + /** Represents a CheckValidCredsRequest. */ + class CheckValidCredsRequest implements ICheckValidCredsRequest { + + /** + * Constructs a new CheckValidCredsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datatransfer.v1.ICheckValidCredsRequest); + + /** CheckValidCredsRequest name. */ + public name: string; + + /** + * Creates a new CheckValidCredsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CheckValidCredsRequest instance + */ + public static create(properties?: google.cloud.bigquery.datatransfer.v1.ICheckValidCredsRequest): google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest; + + /** + * Encodes the specified CheckValidCredsRequest message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest.verify|verify} messages. + * @param message CheckValidCredsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datatransfer.v1.ICheckValidCredsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CheckValidCredsRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest.verify|verify} messages. + * @param message CheckValidCredsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datatransfer.v1.ICheckValidCredsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CheckValidCredsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CheckValidCredsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest; + + /** + * Decodes a CheckValidCredsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CheckValidCredsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest; + + /** + * Verifies a CheckValidCredsRequest 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 CheckValidCredsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CheckValidCredsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest; + + /** + * Creates a plain object from a CheckValidCredsRequest message. Also converts values to other types if specified. + * @param message CheckValidCredsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CheckValidCredsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CheckValidCredsResponse. */ + interface ICheckValidCredsResponse { + + /** CheckValidCredsResponse hasValidCreds */ + hasValidCreds?: (boolean|null); + } + + /** Represents a CheckValidCredsResponse. */ + class CheckValidCredsResponse implements ICheckValidCredsResponse { + + /** + * Constructs a new CheckValidCredsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datatransfer.v1.ICheckValidCredsResponse); + + /** CheckValidCredsResponse hasValidCreds. */ + public hasValidCreds: boolean; + + /** + * Creates a new CheckValidCredsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CheckValidCredsResponse instance + */ + public static create(properties?: google.cloud.bigquery.datatransfer.v1.ICheckValidCredsResponse): google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse; + + /** + * Encodes the specified CheckValidCredsResponse message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse.verify|verify} messages. + * @param message CheckValidCredsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datatransfer.v1.ICheckValidCredsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CheckValidCredsResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse.verify|verify} messages. + * @param message CheckValidCredsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datatransfer.v1.ICheckValidCredsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CheckValidCredsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CheckValidCredsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse; + + /** + * Decodes a CheckValidCredsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CheckValidCredsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse; + + /** + * Verifies a CheckValidCredsResponse 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 CheckValidCredsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CheckValidCredsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse; + + /** + * Creates a plain object from a CheckValidCredsResponse message. Also converts values to other types if specified. + * @param message CheckValidCredsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CheckValidCredsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ScheduleTransferRunsRequest. */ + interface IScheduleTransferRunsRequest { + + /** ScheduleTransferRunsRequest parent */ + parent?: (string|null); + + /** ScheduleTransferRunsRequest startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** ScheduleTransferRunsRequest endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a ScheduleTransferRunsRequest. */ + class ScheduleTransferRunsRequest implements IScheduleTransferRunsRequest { + + /** + * Constructs a new ScheduleTransferRunsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsRequest); + + /** ScheduleTransferRunsRequest parent. */ + public parent: string; + + /** ScheduleTransferRunsRequest startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** ScheduleTransferRunsRequest endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new ScheduleTransferRunsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ScheduleTransferRunsRequest instance + */ + public static create(properties?: google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsRequest): google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest; + + /** + * Encodes the specified ScheduleTransferRunsRequest message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest.verify|verify} messages. + * @param message ScheduleTransferRunsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ScheduleTransferRunsRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest.verify|verify} messages. + * @param message ScheduleTransferRunsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ScheduleTransferRunsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ScheduleTransferRunsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest; + + /** + * Decodes a ScheduleTransferRunsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ScheduleTransferRunsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest; + + /** + * Verifies a ScheduleTransferRunsRequest 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 ScheduleTransferRunsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ScheduleTransferRunsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest; + + /** + * Creates a plain object from a ScheduleTransferRunsRequest message. Also converts values to other types if specified. + * @param message ScheduleTransferRunsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ScheduleTransferRunsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ScheduleTransferRunsResponse. */ + interface IScheduleTransferRunsResponse { + + /** ScheduleTransferRunsResponse runs */ + runs?: (google.cloud.bigquery.datatransfer.v1.ITransferRun[]|null); + } + + /** Represents a ScheduleTransferRunsResponse. */ + class ScheduleTransferRunsResponse implements IScheduleTransferRunsResponse { + + /** + * Constructs a new ScheduleTransferRunsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsResponse); + + /** ScheduleTransferRunsResponse runs. */ + public runs: google.cloud.bigquery.datatransfer.v1.ITransferRun[]; + + /** + * Creates a new ScheduleTransferRunsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ScheduleTransferRunsResponse instance + */ + public static create(properties?: google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsResponse): google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse; + + /** + * Encodes the specified ScheduleTransferRunsResponse message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse.verify|verify} messages. + * @param message ScheduleTransferRunsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ScheduleTransferRunsResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse.verify|verify} messages. + * @param message ScheduleTransferRunsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ScheduleTransferRunsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ScheduleTransferRunsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse; + + /** + * Decodes a ScheduleTransferRunsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ScheduleTransferRunsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse; + + /** + * Verifies a ScheduleTransferRunsResponse 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 ScheduleTransferRunsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ScheduleTransferRunsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse; + + /** + * Creates a plain object from a ScheduleTransferRunsResponse message. Also converts values to other types if specified. + * @param message ScheduleTransferRunsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ScheduleTransferRunsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a StartManualTransferRunsRequest. */ + interface IStartManualTransferRunsRequest { + + /** StartManualTransferRunsRequest parent */ + parent?: (string|null); + + /** StartManualTransferRunsRequest requestedTimeRange */ + requestedTimeRange?: (google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.ITimeRange|null); + + /** StartManualTransferRunsRequest requestedRunTime */ + requestedRunTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a StartManualTransferRunsRequest. */ + class StartManualTransferRunsRequest implements IStartManualTransferRunsRequest { + + /** + * Constructs a new StartManualTransferRunsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest); + + /** StartManualTransferRunsRequest parent. */ + public parent: string; + + /** StartManualTransferRunsRequest requestedTimeRange. */ + public requestedTimeRange?: (google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.ITimeRange|null); + + /** StartManualTransferRunsRequest requestedRunTime. */ + public requestedRunTime?: (google.protobuf.ITimestamp|null); + + /** StartManualTransferRunsRequest time. */ + public time?: ("requestedTimeRange"|"requestedRunTime"); + + /** + * Creates a new StartManualTransferRunsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns StartManualTransferRunsRequest instance + */ + public static create(properties?: google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest): google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest; + + /** + * Encodes the specified StartManualTransferRunsRequest message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.verify|verify} messages. + * @param message StartManualTransferRunsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StartManualTransferRunsRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.verify|verify} messages. + * @param message StartManualTransferRunsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StartManualTransferRunsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StartManualTransferRunsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest; + + /** + * Decodes a StartManualTransferRunsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StartManualTransferRunsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest; + + /** + * Verifies a StartManualTransferRunsRequest 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 StartManualTransferRunsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StartManualTransferRunsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest; + + /** + * Creates a plain object from a StartManualTransferRunsRequest message. Also converts values to other types if specified. + * @param message StartManualTransferRunsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StartManualTransferRunsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace StartManualTransferRunsRequest { + + /** Properties of a TimeRange. */ + interface ITimeRange { + + /** TimeRange startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** TimeRange endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a TimeRange. */ + class TimeRange implements ITimeRange { + + /** + * Constructs a new TimeRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.ITimeRange); + + /** TimeRange startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** TimeRange endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new TimeRange instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeRange instance + */ + public static create(properties?: google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.ITimeRange): google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange; + + /** + * Encodes the specified TimeRange message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange.verify|verify} messages. + * @param message TimeRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.ITimeRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeRange message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange.verify|verify} messages. + * @param message TimeRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.ITimeRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange; + + /** + * Decodes a TimeRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange; + + /** + * Verifies a TimeRange 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 TimeRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeRange + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange; + + /** + * Creates a plain object from a TimeRange message. Also converts values to other types if specified. + * @param message TimeRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a StartManualTransferRunsResponse. */ + interface IStartManualTransferRunsResponse { + + /** StartManualTransferRunsResponse runs */ + runs?: (google.cloud.bigquery.datatransfer.v1.ITransferRun[]|null); + } + + /** Represents a StartManualTransferRunsResponse. */ + class StartManualTransferRunsResponse implements IStartManualTransferRunsResponse { + + /** + * Constructs a new StartManualTransferRunsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsResponse); + + /** StartManualTransferRunsResponse runs. */ + public runs: google.cloud.bigquery.datatransfer.v1.ITransferRun[]; + + /** + * Creates a new StartManualTransferRunsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns StartManualTransferRunsResponse instance + */ + public static create(properties?: google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsResponse): google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse; + + /** + * Encodes the specified StartManualTransferRunsResponse message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse.verify|verify} messages. + * @param message StartManualTransferRunsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StartManualTransferRunsResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse.verify|verify} messages. + * @param message StartManualTransferRunsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StartManualTransferRunsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StartManualTransferRunsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse; + + /** + * Decodes a StartManualTransferRunsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StartManualTransferRunsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse; + + /** + * Verifies a StartManualTransferRunsResponse 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 StartManualTransferRunsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StartManualTransferRunsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse; + + /** + * Creates a plain object from a StartManualTransferRunsResponse message. Also converts values to other types if specified. + * @param message StartManualTransferRunsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StartManualTransferRunsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** TransferType enum. */ + enum TransferType { + TRANSFER_TYPE_UNSPECIFIED = 0, + BATCH = 1, + STREAMING = 2 + } + + /** TransferState enum. */ + enum TransferState { + TRANSFER_STATE_UNSPECIFIED = 0, + PENDING = 2, + RUNNING = 3, + SUCCEEDED = 4, + FAILED = 5, + CANCELLED = 6 + } + + /** Properties of a ScheduleOptions. */ + interface IScheduleOptions { + + /** ScheduleOptions disableAutoScheduling */ + disableAutoScheduling?: (boolean|null); + + /** ScheduleOptions startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** ScheduleOptions endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a ScheduleOptions. */ + class ScheduleOptions implements IScheduleOptions { + + /** + * Constructs a new ScheduleOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datatransfer.v1.IScheduleOptions); + + /** ScheduleOptions disableAutoScheduling. */ + public disableAutoScheduling: boolean; + + /** ScheduleOptions startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** ScheduleOptions endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new ScheduleOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ScheduleOptions instance + */ + public static create(properties?: google.cloud.bigquery.datatransfer.v1.IScheduleOptions): google.cloud.bigquery.datatransfer.v1.ScheduleOptions; + + /** + * Encodes the specified ScheduleOptions message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ScheduleOptions.verify|verify} messages. + * @param message ScheduleOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datatransfer.v1.IScheduleOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ScheduleOptions message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ScheduleOptions.verify|verify} messages. + * @param message ScheduleOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datatransfer.v1.IScheduleOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ScheduleOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ScheduleOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datatransfer.v1.ScheduleOptions; + + /** + * Decodes a ScheduleOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ScheduleOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datatransfer.v1.ScheduleOptions; + + /** + * Verifies a ScheduleOptions 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 ScheduleOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ScheduleOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datatransfer.v1.ScheduleOptions; + + /** + * Creates a plain object from a ScheduleOptions message. Also converts values to other types if specified. + * @param message ScheduleOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datatransfer.v1.ScheduleOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ScheduleOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a TransferConfig. */ + interface ITransferConfig { + + /** TransferConfig name */ + name?: (string|null); + + /** TransferConfig destinationDatasetId */ + destinationDatasetId?: (string|null); + + /** TransferConfig displayName */ + displayName?: (string|null); + + /** TransferConfig dataSourceId */ + dataSourceId?: (string|null); + + /** TransferConfig params */ + params?: (google.protobuf.IStruct|null); + + /** TransferConfig schedule */ + schedule?: (string|null); + + /** TransferConfig scheduleOptions */ + scheduleOptions?: (google.cloud.bigquery.datatransfer.v1.IScheduleOptions|null); + + /** TransferConfig dataRefreshWindowDays */ + dataRefreshWindowDays?: (number|null); + + /** TransferConfig disabled */ + disabled?: (boolean|null); + + /** TransferConfig updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** TransferConfig nextRunTime */ + nextRunTime?: (google.protobuf.ITimestamp|null); + + /** TransferConfig state */ + state?: (google.cloud.bigquery.datatransfer.v1.TransferState|null); + + /** TransferConfig userId */ + userId?: (number|Long|null); + + /** TransferConfig datasetRegion */ + datasetRegion?: (string|null); + } + + /** Represents a TransferConfig. */ + class TransferConfig implements ITransferConfig { + + /** + * Constructs a new TransferConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datatransfer.v1.ITransferConfig); + + /** TransferConfig name. */ + public name: string; + + /** TransferConfig destinationDatasetId. */ + public destinationDatasetId: string; + + /** TransferConfig displayName. */ + public displayName: string; + + /** TransferConfig dataSourceId. */ + public dataSourceId: string; + + /** TransferConfig params. */ + public params?: (google.protobuf.IStruct|null); + + /** TransferConfig schedule. */ + public schedule: string; + + /** TransferConfig scheduleOptions. */ + public scheduleOptions?: (google.cloud.bigquery.datatransfer.v1.IScheduleOptions|null); + + /** TransferConfig dataRefreshWindowDays. */ + public dataRefreshWindowDays: number; + + /** TransferConfig disabled. */ + public disabled: boolean; + + /** TransferConfig updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** TransferConfig nextRunTime. */ + public nextRunTime?: (google.protobuf.ITimestamp|null); + + /** TransferConfig state. */ + public state: google.cloud.bigquery.datatransfer.v1.TransferState; + + /** TransferConfig userId. */ + public userId: (number|Long); + + /** TransferConfig datasetRegion. */ + public datasetRegion: string; + + /** TransferConfig destination. */ + public destination?: "destinationDatasetId"; + + /** + * Creates a new TransferConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns TransferConfig instance + */ + public static create(properties?: google.cloud.bigquery.datatransfer.v1.ITransferConfig): google.cloud.bigquery.datatransfer.v1.TransferConfig; + + /** + * Encodes the specified TransferConfig message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.TransferConfig.verify|verify} messages. + * @param message TransferConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datatransfer.v1.ITransferConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TransferConfig message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.TransferConfig.verify|verify} messages. + * @param message TransferConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datatransfer.v1.ITransferConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TransferConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TransferConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datatransfer.v1.TransferConfig; + + /** + * Decodes a TransferConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TransferConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datatransfer.v1.TransferConfig; + + /** + * Verifies a TransferConfig 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 TransferConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TransferConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datatransfer.v1.TransferConfig; + + /** + * Creates a plain object from a TransferConfig message. Also converts values to other types if specified. + * @param message TransferConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datatransfer.v1.TransferConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TransferConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a TransferRun. */ + interface ITransferRun { + + /** TransferRun name */ + name?: (string|null); + + /** TransferRun scheduleTime */ + scheduleTime?: (google.protobuf.ITimestamp|null); + + /** TransferRun runTime */ + runTime?: (google.protobuf.ITimestamp|null); + + /** TransferRun errorStatus */ + errorStatus?: (google.rpc.IStatus|null); + + /** TransferRun startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** TransferRun endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** TransferRun updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** TransferRun params */ + params?: (google.protobuf.IStruct|null); + + /** TransferRun destinationDatasetId */ + destinationDatasetId?: (string|null); + + /** TransferRun dataSourceId */ + dataSourceId?: (string|null); + + /** TransferRun state */ + state?: (google.cloud.bigquery.datatransfer.v1.TransferState|null); + + /** TransferRun userId */ + userId?: (number|Long|null); + + /** TransferRun schedule */ + schedule?: (string|null); + } + + /** Represents a TransferRun. */ + class TransferRun implements ITransferRun { + + /** + * Constructs a new TransferRun. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datatransfer.v1.ITransferRun); + + /** TransferRun name. */ + public name: string; + + /** TransferRun scheduleTime. */ + public scheduleTime?: (google.protobuf.ITimestamp|null); + + /** TransferRun runTime. */ + public runTime?: (google.protobuf.ITimestamp|null); + + /** TransferRun errorStatus. */ + public errorStatus?: (google.rpc.IStatus|null); + + /** TransferRun startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** TransferRun endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** TransferRun updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** TransferRun params. */ + public params?: (google.protobuf.IStruct|null); + + /** TransferRun destinationDatasetId. */ + public destinationDatasetId: string; + + /** TransferRun dataSourceId. */ + public dataSourceId: string; + + /** TransferRun state. */ + public state: google.cloud.bigquery.datatransfer.v1.TransferState; + + /** TransferRun userId. */ + public userId: (number|Long); + + /** TransferRun schedule. */ + public schedule: string; + + /** TransferRun destination. */ + public destination?: "destinationDatasetId"; + + /** + * Creates a new TransferRun instance using the specified properties. + * @param [properties] Properties to set + * @returns TransferRun instance + */ + public static create(properties?: google.cloud.bigquery.datatransfer.v1.ITransferRun): google.cloud.bigquery.datatransfer.v1.TransferRun; + + /** + * Encodes the specified TransferRun message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.TransferRun.verify|verify} messages. + * @param message TransferRun message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datatransfer.v1.ITransferRun, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TransferRun message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.TransferRun.verify|verify} messages. + * @param message TransferRun message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datatransfer.v1.ITransferRun, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TransferRun message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TransferRun + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datatransfer.v1.TransferRun; + + /** + * Decodes a TransferRun message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TransferRun + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datatransfer.v1.TransferRun; + + /** + * Verifies a TransferRun 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 TransferRun message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TransferRun + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datatransfer.v1.TransferRun; + + /** + * Creates a plain object from a TransferRun message. Also converts values to other types if specified. + * @param message TransferRun + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datatransfer.v1.TransferRun, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TransferRun to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a TransferMessage. */ + interface ITransferMessage { + + /** TransferMessage messageTime */ + messageTime?: (google.protobuf.ITimestamp|null); + + /** TransferMessage severity */ + severity?: (google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity|null); + + /** TransferMessage messageText */ + messageText?: (string|null); + } + + /** Represents a TransferMessage. */ + class TransferMessage implements ITransferMessage { + + /** + * Constructs a new TransferMessage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datatransfer.v1.ITransferMessage); + + /** TransferMessage messageTime. */ + public messageTime?: (google.protobuf.ITimestamp|null); + + /** TransferMessage severity. */ + public severity: google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity; + + /** TransferMessage messageText. */ + public messageText: string; + + /** + * Creates a new TransferMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns TransferMessage instance + */ + public static create(properties?: google.cloud.bigquery.datatransfer.v1.ITransferMessage): google.cloud.bigquery.datatransfer.v1.TransferMessage; + + /** + * Encodes the specified TransferMessage message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.TransferMessage.verify|verify} messages. + * @param message TransferMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datatransfer.v1.ITransferMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TransferMessage message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.TransferMessage.verify|verify} messages. + * @param message TransferMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datatransfer.v1.ITransferMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TransferMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TransferMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datatransfer.v1.TransferMessage; + + /** + * Decodes a TransferMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TransferMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datatransfer.v1.TransferMessage; + + /** + * Verifies a TransferMessage 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 TransferMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TransferMessage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datatransfer.v1.TransferMessage; + + /** + * Creates a plain object from a TransferMessage message. Also converts values to other types if specified. + * @param message TransferMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datatransfer.v1.TransferMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TransferMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace TransferMessage { + + /** MessageSeverity enum. */ + enum MessageSeverity { + MESSAGE_SEVERITY_UNSPECIFIED = 0, + INFO = 1, + WARNING = 2, + ERROR = 3 + } + } + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @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.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @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.api.Http; + + /** + * Verifies a Http 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 Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get: string; + + /** HttpRule put. */ + public put: string; + + /** HttpRule post. */ + public post: string; + + /** HttpRule delete. */ + public delete: string; + + /** HttpRule patch. */ + public patch: string; + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @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.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @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.api.HttpRule; + + /** + * Verifies a HttpRule 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 HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @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.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @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.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern 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 CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: google.api.ResourceDescriptor.History; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @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.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @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.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor 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 ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @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.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @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.api.ResourceReference; + + /** + * Verifies a ResourceReference 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 ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @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.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @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.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet 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 FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @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.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @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.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto 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 FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @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.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @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.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto 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 DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @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.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @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.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange 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 ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @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.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @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.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange 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 ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @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.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @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.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions 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 ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: google.protobuf.FieldDescriptorProto.Label; + + /** FieldDescriptorProto type. */ + public type: google.protobuf.FieldDescriptorProto.Type; + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @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.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @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.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto 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 FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @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.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @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.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto 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 OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @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.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @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.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto 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 EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @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.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @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.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange 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 EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @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.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @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.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto 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 EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @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.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @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.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto 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 ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @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.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @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.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto 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 MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: google.protobuf.FileOptions.OptimizeMode; + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @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.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @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.protobuf.FileOptions; + + /** + * Verifies a FileOptions 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 FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @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.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @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.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions 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 MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: google.protobuf.FieldOptions.CType; + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: google.protobuf.FieldOptions.JSType; + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @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.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @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.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions 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 FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @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.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @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.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions 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 OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @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.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @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.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions 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 EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @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.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @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.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions 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 EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @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.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @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.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions 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 ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: google.protobuf.MethodOptions.IdempotencyLevel; + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @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.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @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.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions 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 MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: Uint8Array; + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @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.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @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.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption 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 UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @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.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @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.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart 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 NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @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.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @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.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo 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 SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @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.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @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.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location 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 Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @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.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @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.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo 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 GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @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.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @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.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation 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 Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a Struct. */ + interface IStruct { + + /** Struct fields */ + fields?: ({ [k: string]: google.protobuf.IValue }|null); + } + + /** Represents a Struct. */ + class Struct implements IStruct { + + /** + * Constructs a new Struct. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IStruct); + + /** Struct fields. */ + public fields: { [k: string]: google.protobuf.IValue }; + + /** + * Creates a new Struct instance using the specified properties. + * @param [properties] Properties to set + * @returns Struct instance + */ + public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; + + /** + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Struct message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Struct + * @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.protobuf.Struct; + + /** + * Decodes a Struct message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Struct + * @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.protobuf.Struct; + + /** + * Verifies a Struct 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 Struct message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Struct + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; + + /** + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @param message Struct + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Struct to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Value. */ + interface IValue { + + /** Value nullValue */ + nullValue?: (google.protobuf.NullValue|null); + + /** Value numberValue */ + numberValue?: (number|null); + + /** Value stringValue */ + stringValue?: (string|null); + + /** Value boolValue */ + boolValue?: (boolean|null); + + /** Value structValue */ + structValue?: (google.protobuf.IStruct|null); + + /** Value listValue */ + listValue?: (google.protobuf.IListValue|null); + } + + /** Represents a Value. */ + class Value implements IValue { + + /** + * Constructs a new Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IValue); + + /** Value nullValue. */ + public nullValue: google.protobuf.NullValue; + + /** Value numberValue. */ + public numberValue: number; + + /** Value stringValue. */ + public stringValue: string; + + /** Value boolValue. */ + public boolValue: boolean; + + /** Value structValue. */ + public structValue?: (google.protobuf.IStruct|null); + + /** Value listValue. */ + public listValue?: (google.protobuf.IListValue|null); + + /** Value kind. */ + public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); + + /** + * Creates a new Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Value instance + */ + public static create(properties?: google.protobuf.IValue): google.protobuf.Value; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Value + * @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.protobuf.Value; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Value + * @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.protobuf.Value; + + /** + * Verifies a Value 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 Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Value; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @param message Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** NullValue enum. */ + enum NullValue { + NULL_VALUE = 0 + } + + /** Properties of a ListValue. */ + interface IListValue { + + /** ListValue values */ + values?: (google.protobuf.IValue[]|null); + } + + /** Represents a ListValue. */ + class ListValue implements IListValue { + + /** + * Constructs a new ListValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IListValue); + + /** ListValue values. */ + public values: google.protobuf.IValue[]; + + /** + * Creates a new ListValue instance using the specified properties. + * @param [properties] Properties to set + * @returns ListValue instance + */ + public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; + + /** + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListValue + * @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.protobuf.ListValue; + + /** + * Decodes a ListValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListValue + * @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.protobuf.ListValue; + + /** + * Verifies a ListValue 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 ListValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; + + /** + * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * @param message ListValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @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.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @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.protobuf.Timestamp; + + /** + * Verifies a Timestamp 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 Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: Uint8Array; + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Any + * @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.protobuf.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Any + * @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.protobuf.Any; + + /** + * Verifies an Any 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 Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @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.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @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.protobuf.Duration; + + /** + * Verifies a Duration 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 Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @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.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @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.protobuf.Empty; + + /** + * Verifies an Empty 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 Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @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.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @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.protobuf.FieldMask; + + /** + * Verifies a FieldMask 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 FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DoubleValue. */ + interface IDoubleValue { + + /** DoubleValue value */ + value?: (number|null); + } + + /** Represents a DoubleValue. */ + class DoubleValue implements IDoubleValue { + + /** + * Constructs a new DoubleValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDoubleValue); + + /** DoubleValue value. */ + public value: number; + + /** + * Creates a new DoubleValue instance using the specified properties. + * @param [properties] Properties to set + * @returns DoubleValue instance + */ + public static create(properties?: google.protobuf.IDoubleValue): google.protobuf.DoubleValue; + + /** + * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @param message DoubleValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @param message DoubleValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DoubleValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DoubleValue + * @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.protobuf.DoubleValue; + + /** + * Decodes a DoubleValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DoubleValue + * @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.protobuf.DoubleValue; + + /** + * Verifies a DoubleValue 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 DoubleValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DoubleValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DoubleValue; + + /** + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * @param message DoubleValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DoubleValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DoubleValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FloatValue. */ + interface IFloatValue { + + /** FloatValue value */ + value?: (number|null); + } + + /** Represents a FloatValue. */ + class FloatValue implements IFloatValue { + + /** + * Constructs a new FloatValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFloatValue); + + /** FloatValue value. */ + public value: number; + + /** + * Creates a new FloatValue instance using the specified properties. + * @param [properties] Properties to set + * @returns FloatValue instance + */ + public static create(properties?: google.protobuf.IFloatValue): google.protobuf.FloatValue; + + /** + * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @param message FloatValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @param message FloatValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FloatValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FloatValue + * @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.protobuf.FloatValue; + + /** + * Decodes a FloatValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FloatValue + * @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.protobuf.FloatValue; + + /** + * Verifies a FloatValue 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 FloatValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FloatValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FloatValue; + + /** + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * @param message FloatValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FloatValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FloatValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Int64Value. */ + interface IInt64Value { + + /** Int64Value value */ + value?: (number|Long|null); + } + + /** Represents an Int64Value. */ + class Int64Value implements IInt64Value { + + /** + * Constructs a new Int64Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt64Value); + + /** Int64Value value. */ + public value: (number|Long); + + /** + * Creates a new Int64Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Int64Value instance + */ + public static create(properties?: google.protobuf.IInt64Value): google.protobuf.Int64Value; + + /** + * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @param message Int64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @param message Int64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Int64Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Int64Value + * @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.protobuf.Int64Value; + + /** + * Decodes an Int64Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Int64Value + * @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.protobuf.Int64Value; + + /** + * Verifies an Int64Value 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 Int64Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int64Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int64Value; + + /** + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * @param message Int64Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Int64Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a UInt64Value. */ + interface IUInt64Value { + + /** UInt64Value value */ + value?: (number|Long|null); + } + + /** Represents a UInt64Value. */ + class UInt64Value implements IUInt64Value { + + /** + * Constructs a new UInt64Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUInt64Value); + + /** UInt64Value value. */ + public value: (number|Long); + + /** + * Creates a new UInt64Value instance using the specified properties. + * @param [properties] Properties to set + * @returns UInt64Value instance + */ + public static create(properties?: google.protobuf.IUInt64Value): google.protobuf.UInt64Value; + + /** + * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @param message UInt64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @param message UInt64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UInt64Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UInt64Value + * @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.protobuf.UInt64Value; + + /** + * Decodes a UInt64Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UInt64Value + * @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.protobuf.UInt64Value; + + /** + * Verifies a UInt64Value 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 UInt64Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UInt64Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt64Value; + + /** + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * @param message UInt64Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UInt64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UInt64Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Int32Value. */ + interface IInt32Value { + + /** Int32Value value */ + value?: (number|null); + } + + /** Represents an Int32Value. */ + class Int32Value implements IInt32Value { + + /** + * Constructs a new Int32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt32Value); + + /** Int32Value value. */ + public value: number; + + /** + * Creates a new Int32Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Int32Value instance + */ + public static create(properties?: google.protobuf.IInt32Value): google.protobuf.Int32Value; + + /** + * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @param message Int32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @param message Int32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Int32Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Int32Value + * @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.protobuf.Int32Value; + + /** + * Decodes an Int32Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Int32Value + * @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.protobuf.Int32Value; + + /** + * Verifies an Int32Value 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 Int32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int32Value; + + /** + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * @param message Int32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Int32Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a UInt32Value. */ + interface IUInt32Value { + + /** UInt32Value value */ + value?: (number|null); + } + + /** Represents a UInt32Value. */ + class UInt32Value implements IUInt32Value { + + /** + * Constructs a new UInt32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUInt32Value); + + /** UInt32Value value. */ + public value: number; + + /** + * Creates a new UInt32Value instance using the specified properties. + * @param [properties] Properties to set + * @returns UInt32Value instance + */ + public static create(properties?: google.protobuf.IUInt32Value): google.protobuf.UInt32Value; + + /** + * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @param message UInt32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @param message UInt32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UInt32Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UInt32Value + * @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.protobuf.UInt32Value; + + /** + * Decodes a UInt32Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UInt32Value + * @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.protobuf.UInt32Value; + + /** + * Verifies a UInt32Value 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 UInt32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UInt32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt32Value; + + /** + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @param message UInt32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UInt32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UInt32Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a BoolValue. */ + interface IBoolValue { + + /** BoolValue value */ + value?: (boolean|null); + } + + /** Represents a BoolValue. */ + class BoolValue implements IBoolValue { + + /** + * Constructs a new BoolValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IBoolValue); + + /** BoolValue value. */ + public value: boolean; + + /** + * Creates a new BoolValue instance using the specified properties. + * @param [properties] Properties to set + * @returns BoolValue instance + */ + public static create(properties?: google.protobuf.IBoolValue): google.protobuf.BoolValue; + + /** + * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @param message BoolValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @param message BoolValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BoolValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BoolValue + * @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.protobuf.BoolValue; + + /** + * Decodes a BoolValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BoolValue + * @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.protobuf.BoolValue; + + /** + * Verifies a BoolValue 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 BoolValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BoolValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.BoolValue; + + /** + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * @param message BoolValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.BoolValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BoolValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a StringValue. */ + interface IStringValue { + + /** StringValue value */ + value?: (string|null); + } + + /** Represents a StringValue. */ + class StringValue implements IStringValue { + + /** + * Constructs a new StringValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IStringValue); + + /** StringValue value. */ + public value: string; + + /** + * Creates a new StringValue instance using the specified properties. + * @param [properties] Properties to set + * @returns StringValue instance + */ + public static create(properties?: google.protobuf.IStringValue): google.protobuf.StringValue; + + /** + * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @param message StringValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @param message StringValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StringValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StringValue + * @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.protobuf.StringValue; + + /** + * Decodes a StringValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StringValue + * @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.protobuf.StringValue; + + /** + * Verifies a StringValue 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 StringValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StringValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; + + /** + * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * @param message StringValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StringValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a BytesValue. */ + interface IBytesValue { + + /** BytesValue value */ + value?: (Uint8Array|null); + } + + /** Represents a BytesValue. */ + class BytesValue implements IBytesValue { + + /** + * Constructs a new BytesValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IBytesValue); + + /** BytesValue value. */ + public value: Uint8Array; + + /** + * Creates a new BytesValue instance using the specified properties. + * @param [properties] Properties to set + * @returns BytesValue instance + */ + public static create(properties?: google.protobuf.IBytesValue): google.protobuf.BytesValue; + + /** + * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @param message BytesValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @param message BytesValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BytesValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BytesValue + * @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.protobuf.BytesValue; + + /** + * Decodes a BytesValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BytesValue + * @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.protobuf.BytesValue; + + /** + * Verifies a BytesValue 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 BytesValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BytesValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; + + /** + * Creates a plain object from a BytesValue message. Also converts values to other types if specified. + * @param message BytesValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BytesValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** Properties of a Status. */ + interface IStatus { + + /** Status code */ + code?: (number|null); + + /** Status message */ + message?: (string|null); + + /** Status details */ + details?: (google.protobuf.IAny[]|null); + } + + /** Represents a Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); + + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: google.rpc.IStatus): google.rpc.Status; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Status message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Status + * @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.rpc.Status; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Status + * @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.rpc.Status; + + /** + * Verifies a Status 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 Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Status; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } +} diff --git a/packages/google-cloud-bigquery-datatransfer/protos/protos.js b/packages/google-cloud-bigquery-datatransfer/protos/protos.js new file mode 100644 index 00000000000..7345000f7ca --- /dev/null +++ b/packages/google-cloud-bigquery-datatransfer/protos/protos.js @@ -0,0 +1,22531 @@ +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("protobufjs/minimal")); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.bigquery = (function() { + + /** + * Namespace bigquery. + * @memberof google.cloud + * @namespace + */ + var bigquery = {}; + + bigquery.datatransfer = (function() { + + /** + * Namespace datatransfer. + * @memberof google.cloud.bigquery + * @namespace + */ + var datatransfer = {}; + + datatransfer.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.bigquery.datatransfer + * @namespace + */ + var v1 = {}; + + v1.DataTransferService = (function() { + + /** + * Constructs a new DataTransferService service. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @classdesc Represents a DataTransferService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function DataTransferService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (DataTransferService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DataTransferService; + + /** + * Creates new DataTransferService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {DataTransferService} RPC service. Useful where requests and/or responses are streamed. + */ + DataTransferService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.bigquery.datatransfer.v1.DataTransferService#getDataSource}. + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @typedef GetDataSourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.bigquery.datatransfer.v1.DataSource} [response] DataSource + */ + + /** + * Calls GetDataSource. + * @function getDataSource + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @instance + * @param {google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest} request GetDataSourceRequest message or plain object + * @param {google.cloud.bigquery.datatransfer.v1.DataTransferService.GetDataSourceCallback} callback Node-style callback called with the error, if any, and DataSource + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTransferService.prototype.getDataSource = function getDataSource(request, callback) { + return this.rpcCall(getDataSource, $root.google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest, $root.google.cloud.bigquery.datatransfer.v1.DataSource, request, callback); + }, "name", { value: "GetDataSource" }); + + /** + * Calls GetDataSource. + * @function getDataSource + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @instance + * @param {google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest} request GetDataSourceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.bigquery.datatransfer.v1.DataTransferService#listDataSources}. + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @typedef ListDataSourcesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse} [response] ListDataSourcesResponse + */ + + /** + * Calls ListDataSources. + * @function listDataSources + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @instance + * @param {google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest} request ListDataSourcesRequest message or plain object + * @param {google.cloud.bigquery.datatransfer.v1.DataTransferService.ListDataSourcesCallback} callback Node-style callback called with the error, if any, and ListDataSourcesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTransferService.prototype.listDataSources = function listDataSources(request, callback) { + return this.rpcCall(listDataSources, $root.google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest, $root.google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse, request, callback); + }, "name", { value: "ListDataSources" }); + + /** + * Calls ListDataSources. + * @function listDataSources + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @instance + * @param {google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest} request ListDataSourcesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.bigquery.datatransfer.v1.DataTransferService#createTransferConfig}. + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @typedef CreateTransferConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.bigquery.datatransfer.v1.TransferConfig} [response] TransferConfig + */ + + /** + * Calls CreateTransferConfig. + * @function createTransferConfig + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @instance + * @param {google.cloud.bigquery.datatransfer.v1.ICreateTransferConfigRequest} request CreateTransferConfigRequest message or plain object + * @param {google.cloud.bigquery.datatransfer.v1.DataTransferService.CreateTransferConfigCallback} callback Node-style callback called with the error, if any, and TransferConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTransferService.prototype.createTransferConfig = function createTransferConfig(request, callback) { + return this.rpcCall(createTransferConfig, $root.google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest, $root.google.cloud.bigquery.datatransfer.v1.TransferConfig, request, callback); + }, "name", { value: "CreateTransferConfig" }); + + /** + * Calls CreateTransferConfig. + * @function createTransferConfig + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @instance + * @param {google.cloud.bigquery.datatransfer.v1.ICreateTransferConfigRequest} request CreateTransferConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.bigquery.datatransfer.v1.DataTransferService#updateTransferConfig}. + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @typedef UpdateTransferConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.bigquery.datatransfer.v1.TransferConfig} [response] TransferConfig + */ + + /** + * Calls UpdateTransferConfig. + * @function updateTransferConfig + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @instance + * @param {google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest} request UpdateTransferConfigRequest message or plain object + * @param {google.cloud.bigquery.datatransfer.v1.DataTransferService.UpdateTransferConfigCallback} callback Node-style callback called with the error, if any, and TransferConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTransferService.prototype.updateTransferConfig = function updateTransferConfig(request, callback) { + return this.rpcCall(updateTransferConfig, $root.google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest, $root.google.cloud.bigquery.datatransfer.v1.TransferConfig, request, callback); + }, "name", { value: "UpdateTransferConfig" }); + + /** + * Calls UpdateTransferConfig. + * @function updateTransferConfig + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @instance + * @param {google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest} request UpdateTransferConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.bigquery.datatransfer.v1.DataTransferService#deleteTransferConfig}. + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @typedef DeleteTransferConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteTransferConfig. + * @function deleteTransferConfig + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @instance + * @param {google.cloud.bigquery.datatransfer.v1.IDeleteTransferConfigRequest} request DeleteTransferConfigRequest message or plain object + * @param {google.cloud.bigquery.datatransfer.v1.DataTransferService.DeleteTransferConfigCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTransferService.prototype.deleteTransferConfig = function deleteTransferConfig(request, callback) { + return this.rpcCall(deleteTransferConfig, $root.google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteTransferConfig" }); + + /** + * Calls DeleteTransferConfig. + * @function deleteTransferConfig + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @instance + * @param {google.cloud.bigquery.datatransfer.v1.IDeleteTransferConfigRequest} request DeleteTransferConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.bigquery.datatransfer.v1.DataTransferService#getTransferConfig}. + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @typedef GetTransferConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.bigquery.datatransfer.v1.TransferConfig} [response] TransferConfig + */ + + /** + * Calls GetTransferConfig. + * @function getTransferConfig + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @instance + * @param {google.cloud.bigquery.datatransfer.v1.IGetTransferConfigRequest} request GetTransferConfigRequest message or plain object + * @param {google.cloud.bigquery.datatransfer.v1.DataTransferService.GetTransferConfigCallback} callback Node-style callback called with the error, if any, and TransferConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTransferService.prototype.getTransferConfig = function getTransferConfig(request, callback) { + return this.rpcCall(getTransferConfig, $root.google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest, $root.google.cloud.bigquery.datatransfer.v1.TransferConfig, request, callback); + }, "name", { value: "GetTransferConfig" }); + + /** + * Calls GetTransferConfig. + * @function getTransferConfig + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @instance + * @param {google.cloud.bigquery.datatransfer.v1.IGetTransferConfigRequest} request GetTransferConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.bigquery.datatransfer.v1.DataTransferService#listTransferConfigs}. + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @typedef ListTransferConfigsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse} [response] ListTransferConfigsResponse + */ + + /** + * Calls ListTransferConfigs. + * @function listTransferConfigs + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @instance + * @param {google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest} request ListTransferConfigsRequest message or plain object + * @param {google.cloud.bigquery.datatransfer.v1.DataTransferService.ListTransferConfigsCallback} callback Node-style callback called with the error, if any, and ListTransferConfigsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTransferService.prototype.listTransferConfigs = function listTransferConfigs(request, callback) { + return this.rpcCall(listTransferConfigs, $root.google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest, $root.google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse, request, callback); + }, "name", { value: "ListTransferConfigs" }); + + /** + * Calls ListTransferConfigs. + * @function listTransferConfigs + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @instance + * @param {google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest} request ListTransferConfigsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.bigquery.datatransfer.v1.DataTransferService#scheduleTransferRuns}. + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @typedef ScheduleTransferRunsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse} [response] ScheduleTransferRunsResponse + */ + + /** + * Calls ScheduleTransferRuns. + * @function scheduleTransferRuns + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @instance + * @param {google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsRequest} request ScheduleTransferRunsRequest message or plain object + * @param {google.cloud.bigquery.datatransfer.v1.DataTransferService.ScheduleTransferRunsCallback} callback Node-style callback called with the error, if any, and ScheduleTransferRunsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTransferService.prototype.scheduleTransferRuns = function scheduleTransferRuns(request, callback) { + return this.rpcCall(scheduleTransferRuns, $root.google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest, $root.google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse, request, callback); + }, "name", { value: "ScheduleTransferRuns" }); + + /** + * Calls ScheduleTransferRuns. + * @function scheduleTransferRuns + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @instance + * @param {google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsRequest} request ScheduleTransferRunsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.bigquery.datatransfer.v1.DataTransferService#startManualTransferRuns}. + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @typedef StartManualTransferRunsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse} [response] StartManualTransferRunsResponse + */ + + /** + * Calls StartManualTransferRuns. + * @function startManualTransferRuns + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @instance + * @param {google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest} request StartManualTransferRunsRequest message or plain object + * @param {google.cloud.bigquery.datatransfer.v1.DataTransferService.StartManualTransferRunsCallback} callback Node-style callback called with the error, if any, and StartManualTransferRunsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTransferService.prototype.startManualTransferRuns = function startManualTransferRuns(request, callback) { + return this.rpcCall(startManualTransferRuns, $root.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest, $root.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse, request, callback); + }, "name", { value: "StartManualTransferRuns" }); + + /** + * Calls StartManualTransferRuns. + * @function startManualTransferRuns + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @instance + * @param {google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest} request StartManualTransferRunsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.bigquery.datatransfer.v1.DataTransferService#getTransferRun}. + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @typedef GetTransferRunCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.bigquery.datatransfer.v1.TransferRun} [response] TransferRun + */ + + /** + * Calls GetTransferRun. + * @function getTransferRun + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @instance + * @param {google.cloud.bigquery.datatransfer.v1.IGetTransferRunRequest} request GetTransferRunRequest message or plain object + * @param {google.cloud.bigquery.datatransfer.v1.DataTransferService.GetTransferRunCallback} callback Node-style callback called with the error, if any, and TransferRun + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTransferService.prototype.getTransferRun = function getTransferRun(request, callback) { + return this.rpcCall(getTransferRun, $root.google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest, $root.google.cloud.bigquery.datatransfer.v1.TransferRun, request, callback); + }, "name", { value: "GetTransferRun" }); + + /** + * Calls GetTransferRun. + * @function getTransferRun + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @instance + * @param {google.cloud.bigquery.datatransfer.v1.IGetTransferRunRequest} request GetTransferRunRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.bigquery.datatransfer.v1.DataTransferService#deleteTransferRun}. + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @typedef DeleteTransferRunCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteTransferRun. + * @function deleteTransferRun + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @instance + * @param {google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest} request DeleteTransferRunRequest message or plain object + * @param {google.cloud.bigquery.datatransfer.v1.DataTransferService.DeleteTransferRunCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTransferService.prototype.deleteTransferRun = function deleteTransferRun(request, callback) { + return this.rpcCall(deleteTransferRun, $root.google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteTransferRun" }); + + /** + * Calls DeleteTransferRun. + * @function deleteTransferRun + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @instance + * @param {google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest} request DeleteTransferRunRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.bigquery.datatransfer.v1.DataTransferService#listTransferRuns}. + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @typedef ListTransferRunsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse} [response] ListTransferRunsResponse + */ + + /** + * Calls ListTransferRuns. + * @function listTransferRuns + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @instance + * @param {google.cloud.bigquery.datatransfer.v1.IListTransferRunsRequest} request ListTransferRunsRequest message or plain object + * @param {google.cloud.bigquery.datatransfer.v1.DataTransferService.ListTransferRunsCallback} callback Node-style callback called with the error, if any, and ListTransferRunsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTransferService.prototype.listTransferRuns = function listTransferRuns(request, callback) { + return this.rpcCall(listTransferRuns, $root.google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest, $root.google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse, request, callback); + }, "name", { value: "ListTransferRuns" }); + + /** + * Calls ListTransferRuns. + * @function listTransferRuns + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @instance + * @param {google.cloud.bigquery.datatransfer.v1.IListTransferRunsRequest} request ListTransferRunsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.bigquery.datatransfer.v1.DataTransferService#listTransferLogs}. + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @typedef ListTransferLogsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse} [response] ListTransferLogsResponse + */ + + /** + * Calls ListTransferLogs. + * @function listTransferLogs + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @instance + * @param {google.cloud.bigquery.datatransfer.v1.IListTransferLogsRequest} request ListTransferLogsRequest message or plain object + * @param {google.cloud.bigquery.datatransfer.v1.DataTransferService.ListTransferLogsCallback} callback Node-style callback called with the error, if any, and ListTransferLogsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTransferService.prototype.listTransferLogs = function listTransferLogs(request, callback) { + return this.rpcCall(listTransferLogs, $root.google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest, $root.google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse, request, callback); + }, "name", { value: "ListTransferLogs" }); + + /** + * Calls ListTransferLogs. + * @function listTransferLogs + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @instance + * @param {google.cloud.bigquery.datatransfer.v1.IListTransferLogsRequest} request ListTransferLogsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.bigquery.datatransfer.v1.DataTransferService#checkValidCreds}. + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @typedef CheckValidCredsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse} [response] CheckValidCredsResponse + */ + + /** + * Calls CheckValidCreds. + * @function checkValidCreds + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @instance + * @param {google.cloud.bigquery.datatransfer.v1.ICheckValidCredsRequest} request CheckValidCredsRequest message or plain object + * @param {google.cloud.bigquery.datatransfer.v1.DataTransferService.CheckValidCredsCallback} callback Node-style callback called with the error, if any, and CheckValidCredsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTransferService.prototype.checkValidCreds = function checkValidCreds(request, callback) { + return this.rpcCall(checkValidCreds, $root.google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest, $root.google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse, request, callback); + }, "name", { value: "CheckValidCreds" }); + + /** + * Calls CheckValidCreds. + * @function checkValidCreds + * @memberof google.cloud.bigquery.datatransfer.v1.DataTransferService + * @instance + * @param {google.cloud.bigquery.datatransfer.v1.ICheckValidCredsRequest} request CheckValidCredsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return DataTransferService; + })(); + + v1.DataSourceParameter = (function() { + + /** + * Properties of a DataSourceParameter. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @interface IDataSourceParameter + * @property {string|null} [paramId] DataSourceParameter paramId + * @property {string|null} [displayName] DataSourceParameter displayName + * @property {string|null} [description] DataSourceParameter description + * @property {google.cloud.bigquery.datatransfer.v1.DataSourceParameter.Type|null} [type] DataSourceParameter type + * @property {boolean|null} [required] DataSourceParameter required + * @property {boolean|null} [repeated] DataSourceParameter repeated + * @property {string|null} [validationRegex] DataSourceParameter validationRegex + * @property {Array.|null} [allowedValues] DataSourceParameter allowedValues + * @property {google.protobuf.IDoubleValue|null} [minValue] DataSourceParameter minValue + * @property {google.protobuf.IDoubleValue|null} [maxValue] DataSourceParameter maxValue + * @property {Array.|null} [fields] DataSourceParameter fields + * @property {string|null} [validationDescription] DataSourceParameter validationDescription + * @property {string|null} [validationHelpUrl] DataSourceParameter validationHelpUrl + * @property {boolean|null} [immutable] DataSourceParameter immutable + * @property {boolean|null} [recurse] DataSourceParameter recurse + * @property {boolean|null} [deprecated] DataSourceParameter deprecated + */ + + /** + * Constructs a new DataSourceParameter. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @classdesc Represents a DataSourceParameter. + * @implements IDataSourceParameter + * @constructor + * @param {google.cloud.bigquery.datatransfer.v1.IDataSourceParameter=} [properties] Properties to set + */ + function DataSourceParameter(properties) { + this.allowedValues = []; + this.fields = []; + 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]]; + } + + /** + * DataSourceParameter paramId. + * @member {string} paramId + * @memberof google.cloud.bigquery.datatransfer.v1.DataSourceParameter + * @instance + */ + DataSourceParameter.prototype.paramId = ""; + + /** + * DataSourceParameter displayName. + * @member {string} displayName + * @memberof google.cloud.bigquery.datatransfer.v1.DataSourceParameter + * @instance + */ + DataSourceParameter.prototype.displayName = ""; + + /** + * DataSourceParameter description. + * @member {string} description + * @memberof google.cloud.bigquery.datatransfer.v1.DataSourceParameter + * @instance + */ + DataSourceParameter.prototype.description = ""; + + /** + * DataSourceParameter type. + * @member {google.cloud.bigquery.datatransfer.v1.DataSourceParameter.Type} type + * @memberof google.cloud.bigquery.datatransfer.v1.DataSourceParameter + * @instance + */ + DataSourceParameter.prototype.type = 0; + + /** + * DataSourceParameter required. + * @member {boolean} required + * @memberof google.cloud.bigquery.datatransfer.v1.DataSourceParameter + * @instance + */ + DataSourceParameter.prototype.required = false; + + /** + * DataSourceParameter repeated. + * @member {boolean} repeated + * @memberof google.cloud.bigquery.datatransfer.v1.DataSourceParameter + * @instance + */ + DataSourceParameter.prototype.repeated = false; + + /** + * DataSourceParameter validationRegex. + * @member {string} validationRegex + * @memberof google.cloud.bigquery.datatransfer.v1.DataSourceParameter + * @instance + */ + DataSourceParameter.prototype.validationRegex = ""; + + /** + * DataSourceParameter allowedValues. + * @member {Array.} allowedValues + * @memberof google.cloud.bigquery.datatransfer.v1.DataSourceParameter + * @instance + */ + DataSourceParameter.prototype.allowedValues = $util.emptyArray; + + /** + * DataSourceParameter minValue. + * @member {google.protobuf.IDoubleValue|null|undefined} minValue + * @memberof google.cloud.bigquery.datatransfer.v1.DataSourceParameter + * @instance + */ + DataSourceParameter.prototype.minValue = null; + + /** + * DataSourceParameter maxValue. + * @member {google.protobuf.IDoubleValue|null|undefined} maxValue + * @memberof google.cloud.bigquery.datatransfer.v1.DataSourceParameter + * @instance + */ + DataSourceParameter.prototype.maxValue = null; + + /** + * DataSourceParameter fields. + * @member {Array.} fields + * @memberof google.cloud.bigquery.datatransfer.v1.DataSourceParameter + * @instance + */ + DataSourceParameter.prototype.fields = $util.emptyArray; + + /** + * DataSourceParameter validationDescription. + * @member {string} validationDescription + * @memberof google.cloud.bigquery.datatransfer.v1.DataSourceParameter + * @instance + */ + DataSourceParameter.prototype.validationDescription = ""; + + /** + * DataSourceParameter validationHelpUrl. + * @member {string} validationHelpUrl + * @memberof google.cloud.bigquery.datatransfer.v1.DataSourceParameter + * @instance + */ + DataSourceParameter.prototype.validationHelpUrl = ""; + + /** + * DataSourceParameter immutable. + * @member {boolean} immutable + * @memberof google.cloud.bigquery.datatransfer.v1.DataSourceParameter + * @instance + */ + DataSourceParameter.prototype.immutable = false; + + /** + * DataSourceParameter recurse. + * @member {boolean} recurse + * @memberof google.cloud.bigquery.datatransfer.v1.DataSourceParameter + * @instance + */ + DataSourceParameter.prototype.recurse = false; + + /** + * DataSourceParameter deprecated. + * @member {boolean} deprecated + * @memberof google.cloud.bigquery.datatransfer.v1.DataSourceParameter + * @instance + */ + DataSourceParameter.prototype.deprecated = false; + + /** + * Creates a new DataSourceParameter instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datatransfer.v1.DataSourceParameter + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IDataSourceParameter=} [properties] Properties to set + * @returns {google.cloud.bigquery.datatransfer.v1.DataSourceParameter} DataSourceParameter instance + */ + DataSourceParameter.create = function create(properties) { + return new DataSourceParameter(properties); + }; + + /** + * Encodes the specified DataSourceParameter message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.DataSourceParameter.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datatransfer.v1.DataSourceParameter + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IDataSourceParameter} message DataSourceParameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSourceParameter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paramId != null && message.hasOwnProperty("paramId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paramId); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type); + if (message.required != null && message.hasOwnProperty("required")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.required); + if (message.repeated != null && message.hasOwnProperty("repeated")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); + if (message.validationRegex != null && message.hasOwnProperty("validationRegex")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.validationRegex); + if (message.allowedValues != null && message.allowedValues.length) + for (var i = 0; i < message.allowedValues.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.allowedValues[i]); + if (message.minValue != null && message.hasOwnProperty("minValue")) + $root.google.protobuf.DoubleValue.encode(message.minValue, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.maxValue != null && message.hasOwnProperty("maxValue")) + $root.google.protobuf.DoubleValue.encode(message.maxValue, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.fields != null && message.fields.length) + for (var i = 0; i < message.fields.length; ++i) + $root.google.cloud.bigquery.datatransfer.v1.DataSourceParameter.encode(message.fields[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.validationDescription != null && message.hasOwnProperty("validationDescription")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.validationDescription); + if (message.validationHelpUrl != null && message.hasOwnProperty("validationHelpUrl")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.validationHelpUrl); + if (message.immutable != null && message.hasOwnProperty("immutable")) + writer.uint32(/* id 14, wireType 0 =*/112).bool(message.immutable); + if (message.recurse != null && message.hasOwnProperty("recurse")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.recurse); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.deprecated); + return writer; + }; + + /** + * Encodes the specified DataSourceParameter message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.DataSourceParameter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.DataSourceParameter + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IDataSourceParameter} message DataSourceParameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSourceParameter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataSourceParameter message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datatransfer.v1.DataSourceParameter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datatransfer.v1.DataSourceParameter} DataSourceParameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSourceParameter.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.cloud.bigquery.datatransfer.v1.DataSourceParameter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.paramId = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 3: + message.description = reader.string(); + break; + case 4: + message.type = reader.int32(); + break; + case 5: + message.required = reader.bool(); + break; + case 6: + message.repeated = reader.bool(); + break; + case 7: + message.validationRegex = reader.string(); + break; + case 8: + if (!(message.allowedValues && message.allowedValues.length)) + message.allowedValues = []; + message.allowedValues.push(reader.string()); + break; + case 9: + message.minValue = $root.google.protobuf.DoubleValue.decode(reader, reader.uint32()); + break; + case 10: + message.maxValue = $root.google.protobuf.DoubleValue.decode(reader, reader.uint32()); + break; + case 11: + if (!(message.fields && message.fields.length)) + message.fields = []; + message.fields.push($root.google.cloud.bigquery.datatransfer.v1.DataSourceParameter.decode(reader, reader.uint32())); + break; + case 12: + message.validationDescription = reader.string(); + break; + case 13: + message.validationHelpUrl = reader.string(); + break; + case 14: + message.immutable = reader.bool(); + break; + case 15: + message.recurse = reader.bool(); + break; + case 20: + message.deprecated = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataSourceParameter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.DataSourceParameter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datatransfer.v1.DataSourceParameter} DataSourceParameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSourceParameter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataSourceParameter message. + * @function verify + * @memberof google.cloud.bigquery.datatransfer.v1.DataSourceParameter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataSourceParameter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paramId != null && message.hasOwnProperty("paramId")) + if (!$util.isString(message.paramId)) + return "paramId: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.required != null && message.hasOwnProperty("required")) + if (typeof message.required !== "boolean") + return "required: boolean expected"; + if (message.repeated != null && message.hasOwnProperty("repeated")) + if (typeof message.repeated !== "boolean") + return "repeated: boolean expected"; + if (message.validationRegex != null && message.hasOwnProperty("validationRegex")) + if (!$util.isString(message.validationRegex)) + return "validationRegex: string expected"; + if (message.allowedValues != null && message.hasOwnProperty("allowedValues")) { + if (!Array.isArray(message.allowedValues)) + return "allowedValues: array expected"; + for (var i = 0; i < message.allowedValues.length; ++i) + if (!$util.isString(message.allowedValues[i])) + return "allowedValues: string[] expected"; + } + if (message.minValue != null && message.hasOwnProperty("minValue")) { + var error = $root.google.protobuf.DoubleValue.verify(message.minValue); + if (error) + return "minValue." + error; + } + if (message.maxValue != null && message.hasOwnProperty("maxValue")) { + var error = $root.google.protobuf.DoubleValue.verify(message.maxValue); + if (error) + return "maxValue." + error; + } + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!Array.isArray(message.fields)) + return "fields: array expected"; + for (var i = 0; i < message.fields.length; ++i) { + var error = $root.google.cloud.bigquery.datatransfer.v1.DataSourceParameter.verify(message.fields[i]); + if (error) + return "fields." + error; + } + } + if (message.validationDescription != null && message.hasOwnProperty("validationDescription")) + if (!$util.isString(message.validationDescription)) + return "validationDescription: string expected"; + if (message.validationHelpUrl != null && message.hasOwnProperty("validationHelpUrl")) + if (!$util.isString(message.validationHelpUrl)) + return "validationHelpUrl: string expected"; + if (message.immutable != null && message.hasOwnProperty("immutable")) + if (typeof message.immutable !== "boolean") + return "immutable: boolean expected"; + if (message.recurse != null && message.hasOwnProperty("recurse")) + if (typeof message.recurse !== "boolean") + return "recurse: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + return null; + }; + + /** + * Creates a DataSourceParameter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datatransfer.v1.DataSourceParameter + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datatransfer.v1.DataSourceParameter} DataSourceParameter + */ + DataSourceParameter.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datatransfer.v1.DataSourceParameter) + return object; + var message = new $root.google.cloud.bigquery.datatransfer.v1.DataSourceParameter(); + if (object.paramId != null) + message.paramId = String(object.paramId); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "STRING": + case 1: + message.type = 1; + break; + case "INTEGER": + case 2: + message.type = 2; + break; + case "DOUBLE": + case 3: + message.type = 3; + break; + case "BOOLEAN": + case 4: + message.type = 4; + break; + case "RECORD": + case 5: + message.type = 5; + break; + case "PLUS_PAGE": + case 6: + message.type = 6; + break; + } + if (object.required != null) + message.required = Boolean(object.required); + if (object.repeated != null) + message.repeated = Boolean(object.repeated); + if (object.validationRegex != null) + message.validationRegex = String(object.validationRegex); + if (object.allowedValues) { + if (!Array.isArray(object.allowedValues)) + throw TypeError(".google.cloud.bigquery.datatransfer.v1.DataSourceParameter.allowedValues: array expected"); + message.allowedValues = []; + for (var i = 0; i < object.allowedValues.length; ++i) + message.allowedValues[i] = String(object.allowedValues[i]); + } + if (object.minValue != null) { + if (typeof object.minValue !== "object") + throw TypeError(".google.cloud.bigquery.datatransfer.v1.DataSourceParameter.minValue: object expected"); + message.minValue = $root.google.protobuf.DoubleValue.fromObject(object.minValue); + } + if (object.maxValue != null) { + if (typeof object.maxValue !== "object") + throw TypeError(".google.cloud.bigquery.datatransfer.v1.DataSourceParameter.maxValue: object expected"); + message.maxValue = $root.google.protobuf.DoubleValue.fromObject(object.maxValue); + } + if (object.fields) { + if (!Array.isArray(object.fields)) + throw TypeError(".google.cloud.bigquery.datatransfer.v1.DataSourceParameter.fields: array expected"); + message.fields = []; + for (var i = 0; i < object.fields.length; ++i) { + if (typeof object.fields[i] !== "object") + throw TypeError(".google.cloud.bigquery.datatransfer.v1.DataSourceParameter.fields: object expected"); + message.fields[i] = $root.google.cloud.bigquery.datatransfer.v1.DataSourceParameter.fromObject(object.fields[i]); + } + } + if (object.validationDescription != null) + message.validationDescription = String(object.validationDescription); + if (object.validationHelpUrl != null) + message.validationHelpUrl = String(object.validationHelpUrl); + if (object.immutable != null) + message.immutable = Boolean(object.immutable); + if (object.recurse != null) + message.recurse = Boolean(object.recurse); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + return message; + }; + + /** + * Creates a plain object from a DataSourceParameter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datatransfer.v1.DataSourceParameter + * @static + * @param {google.cloud.bigquery.datatransfer.v1.DataSourceParameter} message DataSourceParameter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataSourceParameter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.allowedValues = []; + object.fields = []; + } + if (options.defaults) { + object.paramId = ""; + object.displayName = ""; + object.description = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.required = false; + object.repeated = false; + object.validationRegex = ""; + object.minValue = null; + object.maxValue = null; + object.validationDescription = ""; + object.validationHelpUrl = ""; + object.immutable = false; + object.recurse = false; + object.deprecated = false; + } + if (message.paramId != null && message.hasOwnProperty("paramId")) + object.paramId = message.paramId; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.bigquery.datatransfer.v1.DataSourceParameter.Type[message.type] : message.type; + if (message.required != null && message.hasOwnProperty("required")) + object.required = message.required; + if (message.repeated != null && message.hasOwnProperty("repeated")) + object.repeated = message.repeated; + if (message.validationRegex != null && message.hasOwnProperty("validationRegex")) + object.validationRegex = message.validationRegex; + if (message.allowedValues && message.allowedValues.length) { + object.allowedValues = []; + for (var j = 0; j < message.allowedValues.length; ++j) + object.allowedValues[j] = message.allowedValues[j]; + } + if (message.minValue != null && message.hasOwnProperty("minValue")) + object.minValue = $root.google.protobuf.DoubleValue.toObject(message.minValue, options); + if (message.maxValue != null && message.hasOwnProperty("maxValue")) + object.maxValue = $root.google.protobuf.DoubleValue.toObject(message.maxValue, options); + if (message.fields && message.fields.length) { + object.fields = []; + for (var j = 0; j < message.fields.length; ++j) + object.fields[j] = $root.google.cloud.bigquery.datatransfer.v1.DataSourceParameter.toObject(message.fields[j], options); + } + if (message.validationDescription != null && message.hasOwnProperty("validationDescription")) + object.validationDescription = message.validationDescription; + if (message.validationHelpUrl != null && message.hasOwnProperty("validationHelpUrl")) + object.validationHelpUrl = message.validationHelpUrl; + if (message.immutable != null && message.hasOwnProperty("immutable")) + object.immutable = message.immutable; + if (message.recurse != null && message.hasOwnProperty("recurse")) + object.recurse = message.recurse; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + return object; + }; + + /** + * Converts this DataSourceParameter to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datatransfer.v1.DataSourceParameter + * @instance + * @returns {Object.} JSON object + */ + DataSourceParameter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.cloud.bigquery.datatransfer.v1.DataSourceParameter.Type + * @enum {string} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} STRING=1 STRING value + * @property {number} INTEGER=2 INTEGER value + * @property {number} DOUBLE=3 DOUBLE value + * @property {number} BOOLEAN=4 BOOLEAN value + * @property {number} RECORD=5 RECORD value + * @property {number} PLUS_PAGE=6 PLUS_PAGE value + */ + DataSourceParameter.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STRING"] = 1; + values[valuesById[2] = "INTEGER"] = 2; + values[valuesById[3] = "DOUBLE"] = 3; + values[valuesById[4] = "BOOLEAN"] = 4; + values[valuesById[5] = "RECORD"] = 5; + values[valuesById[6] = "PLUS_PAGE"] = 6; + return values; + })(); + + return DataSourceParameter; + })(); + + v1.DataSource = (function() { + + /** + * Properties of a DataSource. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @interface IDataSource + * @property {string|null} [name] DataSource name + * @property {string|null} [dataSourceId] DataSource dataSourceId + * @property {string|null} [displayName] DataSource displayName + * @property {string|null} [description] DataSource description + * @property {string|null} [clientId] DataSource clientId + * @property {Array.|null} [scopes] DataSource scopes + * @property {google.cloud.bigquery.datatransfer.v1.TransferType|null} [transferType] DataSource transferType + * @property {boolean|null} [supportsMultipleTransfers] DataSource supportsMultipleTransfers + * @property {number|null} [updateDeadlineSeconds] DataSource updateDeadlineSeconds + * @property {string|null} [defaultSchedule] DataSource defaultSchedule + * @property {boolean|null} [supportsCustomSchedule] DataSource supportsCustomSchedule + * @property {Array.|null} [parameters] DataSource parameters + * @property {string|null} [helpUrl] DataSource helpUrl + * @property {google.cloud.bigquery.datatransfer.v1.DataSource.AuthorizationType|null} [authorizationType] DataSource authorizationType + * @property {google.cloud.bigquery.datatransfer.v1.DataSource.DataRefreshType|null} [dataRefreshType] DataSource dataRefreshType + * @property {number|null} [defaultDataRefreshWindowDays] DataSource defaultDataRefreshWindowDays + * @property {boolean|null} [manualRunsDisabled] DataSource manualRunsDisabled + * @property {google.protobuf.IDuration|null} [minimumScheduleInterval] DataSource minimumScheduleInterval + */ + + /** + * Constructs a new DataSource. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @classdesc Represents a DataSource. + * @implements IDataSource + * @constructor + * @param {google.cloud.bigquery.datatransfer.v1.IDataSource=} [properties] Properties to set + */ + function DataSource(properties) { + this.scopes = []; + this.parameters = []; + 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]]; + } + + /** + * DataSource name. + * @member {string} name + * @memberof google.cloud.bigquery.datatransfer.v1.DataSource + * @instance + */ + DataSource.prototype.name = ""; + + /** + * DataSource dataSourceId. + * @member {string} dataSourceId + * @memberof google.cloud.bigquery.datatransfer.v1.DataSource + * @instance + */ + DataSource.prototype.dataSourceId = ""; + + /** + * DataSource displayName. + * @member {string} displayName + * @memberof google.cloud.bigquery.datatransfer.v1.DataSource + * @instance + */ + DataSource.prototype.displayName = ""; + + /** + * DataSource description. + * @member {string} description + * @memberof google.cloud.bigquery.datatransfer.v1.DataSource + * @instance + */ + DataSource.prototype.description = ""; + + /** + * DataSource clientId. + * @member {string} clientId + * @memberof google.cloud.bigquery.datatransfer.v1.DataSource + * @instance + */ + DataSource.prototype.clientId = ""; + + /** + * DataSource scopes. + * @member {Array.} scopes + * @memberof google.cloud.bigquery.datatransfer.v1.DataSource + * @instance + */ + DataSource.prototype.scopes = $util.emptyArray; + + /** + * DataSource transferType. + * @member {google.cloud.bigquery.datatransfer.v1.TransferType} transferType + * @memberof google.cloud.bigquery.datatransfer.v1.DataSource + * @instance + */ + DataSource.prototype.transferType = 0; + + /** + * DataSource supportsMultipleTransfers. + * @member {boolean} supportsMultipleTransfers + * @memberof google.cloud.bigquery.datatransfer.v1.DataSource + * @instance + */ + DataSource.prototype.supportsMultipleTransfers = false; + + /** + * DataSource updateDeadlineSeconds. + * @member {number} updateDeadlineSeconds + * @memberof google.cloud.bigquery.datatransfer.v1.DataSource + * @instance + */ + DataSource.prototype.updateDeadlineSeconds = 0; + + /** + * DataSource defaultSchedule. + * @member {string} defaultSchedule + * @memberof google.cloud.bigquery.datatransfer.v1.DataSource + * @instance + */ + DataSource.prototype.defaultSchedule = ""; + + /** + * DataSource supportsCustomSchedule. + * @member {boolean} supportsCustomSchedule + * @memberof google.cloud.bigquery.datatransfer.v1.DataSource + * @instance + */ + DataSource.prototype.supportsCustomSchedule = false; + + /** + * DataSource parameters. + * @member {Array.} parameters + * @memberof google.cloud.bigquery.datatransfer.v1.DataSource + * @instance + */ + DataSource.prototype.parameters = $util.emptyArray; + + /** + * DataSource helpUrl. + * @member {string} helpUrl + * @memberof google.cloud.bigquery.datatransfer.v1.DataSource + * @instance + */ + DataSource.prototype.helpUrl = ""; + + /** + * DataSource authorizationType. + * @member {google.cloud.bigquery.datatransfer.v1.DataSource.AuthorizationType} authorizationType + * @memberof google.cloud.bigquery.datatransfer.v1.DataSource + * @instance + */ + DataSource.prototype.authorizationType = 0; + + /** + * DataSource dataRefreshType. + * @member {google.cloud.bigquery.datatransfer.v1.DataSource.DataRefreshType} dataRefreshType + * @memberof google.cloud.bigquery.datatransfer.v1.DataSource + * @instance + */ + DataSource.prototype.dataRefreshType = 0; + + /** + * DataSource defaultDataRefreshWindowDays. + * @member {number} defaultDataRefreshWindowDays + * @memberof google.cloud.bigquery.datatransfer.v1.DataSource + * @instance + */ + DataSource.prototype.defaultDataRefreshWindowDays = 0; + + /** + * DataSource manualRunsDisabled. + * @member {boolean} manualRunsDisabled + * @memberof google.cloud.bigquery.datatransfer.v1.DataSource + * @instance + */ + DataSource.prototype.manualRunsDisabled = false; + + /** + * DataSource minimumScheduleInterval. + * @member {google.protobuf.IDuration|null|undefined} minimumScheduleInterval + * @memberof google.cloud.bigquery.datatransfer.v1.DataSource + * @instance + */ + DataSource.prototype.minimumScheduleInterval = null; + + /** + * Creates a new DataSource instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datatransfer.v1.DataSource + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IDataSource=} [properties] Properties to set + * @returns {google.cloud.bigquery.datatransfer.v1.DataSource} DataSource instance + */ + DataSource.create = function create(properties) { + return new DataSource(properties); + }; + + /** + * Encodes the specified DataSource message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.DataSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datatransfer.v1.DataSource + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IDataSource} message DataSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.dataSourceId != null && message.hasOwnProperty("dataSourceId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataSourceId); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + if (message.clientId != null && message.hasOwnProperty("clientId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.clientId); + if (message.scopes != null && message.scopes.length) + for (var i = 0; i < message.scopes.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.scopes[i]); + if (message.transferType != null && message.hasOwnProperty("transferType")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.transferType); + if (message.supportsMultipleTransfers != null && message.hasOwnProperty("supportsMultipleTransfers")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.supportsMultipleTransfers); + if (message.updateDeadlineSeconds != null && message.hasOwnProperty("updateDeadlineSeconds")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.updateDeadlineSeconds); + if (message.defaultSchedule != null && message.hasOwnProperty("defaultSchedule")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.defaultSchedule); + if (message.supportsCustomSchedule != null && message.hasOwnProperty("supportsCustomSchedule")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.supportsCustomSchedule); + if (message.parameters != null && message.parameters.length) + for (var i = 0; i < message.parameters.length; ++i) + $root.google.cloud.bigquery.datatransfer.v1.DataSourceParameter.encode(message.parameters[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.helpUrl != null && message.hasOwnProperty("helpUrl")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.helpUrl); + if (message.authorizationType != null && message.hasOwnProperty("authorizationType")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.authorizationType); + if (message.dataRefreshType != null && message.hasOwnProperty("dataRefreshType")) + writer.uint32(/* id 15, wireType 0 =*/120).int32(message.dataRefreshType); + if (message.defaultDataRefreshWindowDays != null && message.hasOwnProperty("defaultDataRefreshWindowDays")) + writer.uint32(/* id 16, wireType 0 =*/128).int32(message.defaultDataRefreshWindowDays); + if (message.manualRunsDisabled != null && message.hasOwnProperty("manualRunsDisabled")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.manualRunsDisabled); + if (message.minimumScheduleInterval != null && message.hasOwnProperty("minimumScheduleInterval")) + $root.google.protobuf.Duration.encode(message.minimumScheduleInterval, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataSource message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.DataSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.DataSource + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IDataSource} message DataSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datatransfer.v1.DataSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datatransfer.v1.DataSource} DataSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSource.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.cloud.bigquery.datatransfer.v1.DataSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.dataSourceId = reader.string(); + break; + case 3: + message.displayName = reader.string(); + break; + case 4: + message.description = reader.string(); + break; + case 5: + message.clientId = reader.string(); + break; + case 6: + if (!(message.scopes && message.scopes.length)) + message.scopes = []; + message.scopes.push(reader.string()); + break; + case 7: + message.transferType = reader.int32(); + break; + case 8: + message.supportsMultipleTransfers = reader.bool(); + break; + case 9: + message.updateDeadlineSeconds = reader.int32(); + break; + case 10: + message.defaultSchedule = reader.string(); + break; + case 11: + message.supportsCustomSchedule = reader.bool(); + break; + case 12: + if (!(message.parameters && message.parameters.length)) + message.parameters = []; + message.parameters.push($root.google.cloud.bigquery.datatransfer.v1.DataSourceParameter.decode(reader, reader.uint32())); + break; + case 13: + message.helpUrl = reader.string(); + break; + case 14: + message.authorizationType = reader.int32(); + break; + case 15: + message.dataRefreshType = reader.int32(); + break; + case 16: + message.defaultDataRefreshWindowDays = reader.int32(); + break; + case 17: + message.manualRunsDisabled = reader.bool(); + break; + case 18: + message.minimumScheduleInterval = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.DataSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datatransfer.v1.DataSource} DataSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataSource message. + * @function verify + * @memberof google.cloud.bigquery.datatransfer.v1.DataSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.dataSourceId != null && message.hasOwnProperty("dataSourceId")) + if (!$util.isString(message.dataSourceId)) + return "dataSourceId: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.scopes != null && message.hasOwnProperty("scopes")) { + if (!Array.isArray(message.scopes)) + return "scopes: array expected"; + for (var i = 0; i < message.scopes.length; ++i) + if (!$util.isString(message.scopes[i])) + return "scopes: string[] expected"; + } + if (message.transferType != null && message.hasOwnProperty("transferType")) + switch (message.transferType) { + default: + return "transferType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.supportsMultipleTransfers != null && message.hasOwnProperty("supportsMultipleTransfers")) + if (typeof message.supportsMultipleTransfers !== "boolean") + return "supportsMultipleTransfers: boolean expected"; + if (message.updateDeadlineSeconds != null && message.hasOwnProperty("updateDeadlineSeconds")) + if (!$util.isInteger(message.updateDeadlineSeconds)) + return "updateDeadlineSeconds: integer expected"; + if (message.defaultSchedule != null && message.hasOwnProperty("defaultSchedule")) + if (!$util.isString(message.defaultSchedule)) + return "defaultSchedule: string expected"; + if (message.supportsCustomSchedule != null && message.hasOwnProperty("supportsCustomSchedule")) + if (typeof message.supportsCustomSchedule !== "boolean") + return "supportsCustomSchedule: boolean expected"; + if (message.parameters != null && message.hasOwnProperty("parameters")) { + if (!Array.isArray(message.parameters)) + return "parameters: array expected"; + for (var i = 0; i < message.parameters.length; ++i) { + var error = $root.google.cloud.bigquery.datatransfer.v1.DataSourceParameter.verify(message.parameters[i]); + if (error) + return "parameters." + error; + } + } + if (message.helpUrl != null && message.hasOwnProperty("helpUrl")) + if (!$util.isString(message.helpUrl)) + return "helpUrl: string expected"; + if (message.authorizationType != null && message.hasOwnProperty("authorizationType")) + switch (message.authorizationType) { + default: + return "authorizationType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.dataRefreshType != null && message.hasOwnProperty("dataRefreshType")) + switch (message.dataRefreshType) { + default: + return "dataRefreshType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.defaultDataRefreshWindowDays != null && message.hasOwnProperty("defaultDataRefreshWindowDays")) + if (!$util.isInteger(message.defaultDataRefreshWindowDays)) + return "defaultDataRefreshWindowDays: integer expected"; + if (message.manualRunsDisabled != null && message.hasOwnProperty("manualRunsDisabled")) + if (typeof message.manualRunsDisabled !== "boolean") + return "manualRunsDisabled: boolean expected"; + if (message.minimumScheduleInterval != null && message.hasOwnProperty("minimumScheduleInterval")) { + var error = $root.google.protobuf.Duration.verify(message.minimumScheduleInterval); + if (error) + return "minimumScheduleInterval." + error; + } + return null; + }; + + /** + * Creates a DataSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datatransfer.v1.DataSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datatransfer.v1.DataSource} DataSource + */ + DataSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datatransfer.v1.DataSource) + return object; + var message = new $root.google.cloud.bigquery.datatransfer.v1.DataSource(); + if (object.name != null) + message.name = String(object.name); + if (object.dataSourceId != null) + message.dataSourceId = String(object.dataSourceId); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.scopes) { + if (!Array.isArray(object.scopes)) + throw TypeError(".google.cloud.bigquery.datatransfer.v1.DataSource.scopes: array expected"); + message.scopes = []; + for (var i = 0; i < object.scopes.length; ++i) + message.scopes[i] = String(object.scopes[i]); + } + switch (object.transferType) { + case "TRANSFER_TYPE_UNSPECIFIED": + case 0: + message.transferType = 0; + break; + case "BATCH": + case 1: + message.transferType = 1; + break; + case "STREAMING": + case 2: + message.transferType = 2; + break; + } + if (object.supportsMultipleTransfers != null) + message.supportsMultipleTransfers = Boolean(object.supportsMultipleTransfers); + if (object.updateDeadlineSeconds != null) + message.updateDeadlineSeconds = object.updateDeadlineSeconds | 0; + if (object.defaultSchedule != null) + message.defaultSchedule = String(object.defaultSchedule); + if (object.supportsCustomSchedule != null) + message.supportsCustomSchedule = Boolean(object.supportsCustomSchedule); + if (object.parameters) { + if (!Array.isArray(object.parameters)) + throw TypeError(".google.cloud.bigquery.datatransfer.v1.DataSource.parameters: array expected"); + message.parameters = []; + for (var i = 0; i < object.parameters.length; ++i) { + if (typeof object.parameters[i] !== "object") + throw TypeError(".google.cloud.bigquery.datatransfer.v1.DataSource.parameters: object expected"); + message.parameters[i] = $root.google.cloud.bigquery.datatransfer.v1.DataSourceParameter.fromObject(object.parameters[i]); + } + } + if (object.helpUrl != null) + message.helpUrl = String(object.helpUrl); + switch (object.authorizationType) { + case "AUTHORIZATION_TYPE_UNSPECIFIED": + case 0: + message.authorizationType = 0; + break; + case "AUTHORIZATION_CODE": + case 1: + message.authorizationType = 1; + break; + case "GOOGLE_PLUS_AUTHORIZATION_CODE": + case 2: + message.authorizationType = 2; + break; + } + switch (object.dataRefreshType) { + case "DATA_REFRESH_TYPE_UNSPECIFIED": + case 0: + message.dataRefreshType = 0; + break; + case "SLIDING_WINDOW": + case 1: + message.dataRefreshType = 1; + break; + case "CUSTOM_SLIDING_WINDOW": + case 2: + message.dataRefreshType = 2; + break; + } + if (object.defaultDataRefreshWindowDays != null) + message.defaultDataRefreshWindowDays = object.defaultDataRefreshWindowDays | 0; + if (object.manualRunsDisabled != null) + message.manualRunsDisabled = Boolean(object.manualRunsDisabled); + if (object.minimumScheduleInterval != null) { + if (typeof object.minimumScheduleInterval !== "object") + throw TypeError(".google.cloud.bigquery.datatransfer.v1.DataSource.minimumScheduleInterval: object expected"); + message.minimumScheduleInterval = $root.google.protobuf.Duration.fromObject(object.minimumScheduleInterval); + } + return message; + }; + + /** + * Creates a plain object from a DataSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datatransfer.v1.DataSource + * @static + * @param {google.cloud.bigquery.datatransfer.v1.DataSource} message DataSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.scopes = []; + object.parameters = []; + } + if (options.defaults) { + object.name = ""; + object.dataSourceId = ""; + object.displayName = ""; + object.description = ""; + object.clientId = ""; + object.transferType = options.enums === String ? "TRANSFER_TYPE_UNSPECIFIED" : 0; + object.supportsMultipleTransfers = false; + object.updateDeadlineSeconds = 0; + object.defaultSchedule = ""; + object.supportsCustomSchedule = false; + object.helpUrl = ""; + object.authorizationType = options.enums === String ? "AUTHORIZATION_TYPE_UNSPECIFIED" : 0; + object.dataRefreshType = options.enums === String ? "DATA_REFRESH_TYPE_UNSPECIFIED" : 0; + object.defaultDataRefreshWindowDays = 0; + object.manualRunsDisabled = false; + object.minimumScheduleInterval = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.dataSourceId != null && message.hasOwnProperty("dataSourceId")) + object.dataSourceId = message.dataSourceId; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.scopes && message.scopes.length) { + object.scopes = []; + for (var j = 0; j < message.scopes.length; ++j) + object.scopes[j] = message.scopes[j]; + } + if (message.transferType != null && message.hasOwnProperty("transferType")) + object.transferType = options.enums === String ? $root.google.cloud.bigquery.datatransfer.v1.TransferType[message.transferType] : message.transferType; + if (message.supportsMultipleTransfers != null && message.hasOwnProperty("supportsMultipleTransfers")) + object.supportsMultipleTransfers = message.supportsMultipleTransfers; + if (message.updateDeadlineSeconds != null && message.hasOwnProperty("updateDeadlineSeconds")) + object.updateDeadlineSeconds = message.updateDeadlineSeconds; + if (message.defaultSchedule != null && message.hasOwnProperty("defaultSchedule")) + object.defaultSchedule = message.defaultSchedule; + if (message.supportsCustomSchedule != null && message.hasOwnProperty("supportsCustomSchedule")) + object.supportsCustomSchedule = message.supportsCustomSchedule; + if (message.parameters && message.parameters.length) { + object.parameters = []; + for (var j = 0; j < message.parameters.length; ++j) + object.parameters[j] = $root.google.cloud.bigquery.datatransfer.v1.DataSourceParameter.toObject(message.parameters[j], options); + } + if (message.helpUrl != null && message.hasOwnProperty("helpUrl")) + object.helpUrl = message.helpUrl; + if (message.authorizationType != null && message.hasOwnProperty("authorizationType")) + object.authorizationType = options.enums === String ? $root.google.cloud.bigquery.datatransfer.v1.DataSource.AuthorizationType[message.authorizationType] : message.authorizationType; + if (message.dataRefreshType != null && message.hasOwnProperty("dataRefreshType")) + object.dataRefreshType = options.enums === String ? $root.google.cloud.bigquery.datatransfer.v1.DataSource.DataRefreshType[message.dataRefreshType] : message.dataRefreshType; + if (message.defaultDataRefreshWindowDays != null && message.hasOwnProperty("defaultDataRefreshWindowDays")) + object.defaultDataRefreshWindowDays = message.defaultDataRefreshWindowDays; + if (message.manualRunsDisabled != null && message.hasOwnProperty("manualRunsDisabled")) + object.manualRunsDisabled = message.manualRunsDisabled; + if (message.minimumScheduleInterval != null && message.hasOwnProperty("minimumScheduleInterval")) + object.minimumScheduleInterval = $root.google.protobuf.Duration.toObject(message.minimumScheduleInterval, options); + return object; + }; + + /** + * Converts this DataSource to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datatransfer.v1.DataSource + * @instance + * @returns {Object.} JSON object + */ + DataSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * AuthorizationType enum. + * @name google.cloud.bigquery.datatransfer.v1.DataSource.AuthorizationType + * @enum {string} + * @property {number} AUTHORIZATION_TYPE_UNSPECIFIED=0 AUTHORIZATION_TYPE_UNSPECIFIED value + * @property {number} AUTHORIZATION_CODE=1 AUTHORIZATION_CODE value + * @property {number} GOOGLE_PLUS_AUTHORIZATION_CODE=2 GOOGLE_PLUS_AUTHORIZATION_CODE value + */ + DataSource.AuthorizationType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AUTHORIZATION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "AUTHORIZATION_CODE"] = 1; + values[valuesById[2] = "GOOGLE_PLUS_AUTHORIZATION_CODE"] = 2; + return values; + })(); + + /** + * DataRefreshType enum. + * @name google.cloud.bigquery.datatransfer.v1.DataSource.DataRefreshType + * @enum {string} + * @property {number} DATA_REFRESH_TYPE_UNSPECIFIED=0 DATA_REFRESH_TYPE_UNSPECIFIED value + * @property {number} SLIDING_WINDOW=1 SLIDING_WINDOW value + * @property {number} CUSTOM_SLIDING_WINDOW=2 CUSTOM_SLIDING_WINDOW value + */ + DataSource.DataRefreshType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATA_REFRESH_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SLIDING_WINDOW"] = 1; + values[valuesById[2] = "CUSTOM_SLIDING_WINDOW"] = 2; + return values; + })(); + + return DataSource; + })(); + + v1.GetDataSourceRequest = (function() { + + /** + * Properties of a GetDataSourceRequest. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @interface IGetDataSourceRequest + * @property {string|null} [name] GetDataSourceRequest name + */ + + /** + * Constructs a new GetDataSourceRequest. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @classdesc Represents a GetDataSourceRequest. + * @implements IGetDataSourceRequest + * @constructor + * @param {google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest=} [properties] Properties to set + */ + function GetDataSourceRequest(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]]; + } + + /** + * GetDataSourceRequest name. + * @member {string} name + * @memberof google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest + * @instance + */ + GetDataSourceRequest.prototype.name = ""; + + /** + * Creates a new GetDataSourceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest} GetDataSourceRequest instance + */ + GetDataSourceRequest.create = function create(properties) { + return new GetDataSourceRequest(properties); + }; + + /** + * Encodes the specified GetDataSourceRequest message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest} message GetDataSourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataSourceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest} message GetDataSourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDataSourceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest} GetDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataSourceRequest.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.cloud.bigquery.datatransfer.v1.GetDataSourceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDataSourceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest} GetDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataSourceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDataSourceRequest message. + * @function verify + * @memberof google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDataSourceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetDataSourceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest} GetDataSourceRequest + */ + GetDataSourceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest) + return object; + var message = new $root.google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetDataSourceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest} message GetDataSourceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDataSourceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetDataSourceRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest + * @instance + * @returns {Object.} JSON object + */ + GetDataSourceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetDataSourceRequest; + })(); + + v1.ListDataSourcesRequest = (function() { + + /** + * Properties of a ListDataSourcesRequest. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @interface IListDataSourcesRequest + * @property {string|null} [parent] ListDataSourcesRequest parent + * @property {string|null} [pageToken] ListDataSourcesRequest pageToken + * @property {number|null} [pageSize] ListDataSourcesRequest pageSize + */ + + /** + * Constructs a new ListDataSourcesRequest. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @classdesc Represents a ListDataSourcesRequest. + * @implements IListDataSourcesRequest + * @constructor + * @param {google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest=} [properties] Properties to set + */ + function ListDataSourcesRequest(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]]; + } + + /** + * ListDataSourcesRequest parent. + * @member {string} parent + * @memberof google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest + * @instance + */ + ListDataSourcesRequest.prototype.parent = ""; + + /** + * ListDataSourcesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest + * @instance + */ + ListDataSourcesRequest.prototype.pageToken = ""; + + /** + * ListDataSourcesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest + * @instance + */ + ListDataSourcesRequest.prototype.pageSize = 0; + + /** + * Creates a new ListDataSourcesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest} ListDataSourcesRequest instance + */ + ListDataSourcesRequest.create = function create(properties) { + return new ListDataSourcesRequest(properties); + }; + + /** + * Encodes the specified ListDataSourcesRequest message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest} message ListDataSourcesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataSourcesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); + return writer; + }; + + /** + * Encodes the specified ListDataSourcesRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest} message ListDataSourcesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataSourcesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataSourcesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest} ListDataSourcesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataSourcesRequest.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.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.pageSize = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDataSourcesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest} ListDataSourcesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataSourcesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataSourcesRequest message. + * @function verify + * @memberof google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataSourcesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + return null; + }; + + /** + * Creates a ListDataSourcesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest} ListDataSourcesRequest + */ + ListDataSourcesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest) + return object; + var message = new $root.google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + return message; + }; + + /** + * Creates a plain object from a ListDataSourcesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest} message ListDataSourcesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataSourcesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + return object; + }; + + /** + * Converts this ListDataSourcesRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest + * @instance + * @returns {Object.} JSON object + */ + ListDataSourcesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListDataSourcesRequest; + })(); + + v1.ListDataSourcesResponse = (function() { + + /** + * Properties of a ListDataSourcesResponse. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @interface IListDataSourcesResponse + * @property {Array.|null} [dataSources] ListDataSourcesResponse dataSources + * @property {string|null} [nextPageToken] ListDataSourcesResponse nextPageToken + */ + + /** + * Constructs a new ListDataSourcesResponse. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @classdesc Represents a ListDataSourcesResponse. + * @implements IListDataSourcesResponse + * @constructor + * @param {google.cloud.bigquery.datatransfer.v1.IListDataSourcesResponse=} [properties] Properties to set + */ + function ListDataSourcesResponse(properties) { + this.dataSources = []; + 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]]; + } + + /** + * ListDataSourcesResponse dataSources. + * @member {Array.} dataSources + * @memberof google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse + * @instance + */ + ListDataSourcesResponse.prototype.dataSources = $util.emptyArray; + + /** + * ListDataSourcesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse + * @instance + */ + ListDataSourcesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListDataSourcesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IListDataSourcesResponse=} [properties] Properties to set + * @returns {google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse} ListDataSourcesResponse instance + */ + ListDataSourcesResponse.create = function create(properties) { + return new ListDataSourcesResponse(properties); + }; + + /** + * Encodes the specified ListDataSourcesResponse message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IListDataSourcesResponse} message ListDataSourcesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataSourcesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataSources != null && message.dataSources.length) + for (var i = 0; i < message.dataSources.length; ++i) + $root.google.cloud.bigquery.datatransfer.v1.DataSource.encode(message.dataSources[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListDataSourcesResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IListDataSourcesResponse} message ListDataSourcesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataSourcesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataSourcesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse} ListDataSourcesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataSourcesResponse.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.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.dataSources && message.dataSources.length)) + message.dataSources = []; + message.dataSources.push($root.google.cloud.bigquery.datatransfer.v1.DataSource.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDataSourcesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse} ListDataSourcesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataSourcesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataSourcesResponse message. + * @function verify + * @memberof google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataSourcesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataSources != null && message.hasOwnProperty("dataSources")) { + if (!Array.isArray(message.dataSources)) + return "dataSources: array expected"; + for (var i = 0; i < message.dataSources.length; ++i) { + var error = $root.google.cloud.bigquery.datatransfer.v1.DataSource.verify(message.dataSources[i]); + if (error) + return "dataSources." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListDataSourcesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse} ListDataSourcesResponse + */ + ListDataSourcesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse) + return object; + var message = new $root.google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse(); + if (object.dataSources) { + if (!Array.isArray(object.dataSources)) + throw TypeError(".google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse.dataSources: array expected"); + message.dataSources = []; + for (var i = 0; i < object.dataSources.length; ++i) { + if (typeof object.dataSources[i] !== "object") + throw TypeError(".google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse.dataSources: object expected"); + message.dataSources[i] = $root.google.cloud.bigquery.datatransfer.v1.DataSource.fromObject(object.dataSources[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListDataSourcesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse + * @static + * @param {google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse} message ListDataSourcesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataSourcesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataSources = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.dataSources && message.dataSources.length) { + object.dataSources = []; + for (var j = 0; j < message.dataSources.length; ++j) + object.dataSources[j] = $root.google.cloud.bigquery.datatransfer.v1.DataSource.toObject(message.dataSources[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListDataSourcesResponse to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse + * @instance + * @returns {Object.} JSON object + */ + ListDataSourcesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListDataSourcesResponse; + })(); + + v1.CreateTransferConfigRequest = (function() { + + /** + * Properties of a CreateTransferConfigRequest. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @interface ICreateTransferConfigRequest + * @property {string|null} [parent] CreateTransferConfigRequest parent + * @property {google.cloud.bigquery.datatransfer.v1.ITransferConfig|null} [transferConfig] CreateTransferConfigRequest transferConfig + * @property {string|null} [authorizationCode] CreateTransferConfigRequest authorizationCode + * @property {string|null} [versionInfo] CreateTransferConfigRequest versionInfo + */ + + /** + * Constructs a new CreateTransferConfigRequest. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @classdesc Represents a CreateTransferConfigRequest. + * @implements ICreateTransferConfigRequest + * @constructor + * @param {google.cloud.bigquery.datatransfer.v1.ICreateTransferConfigRequest=} [properties] Properties to set + */ + function CreateTransferConfigRequest(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]]; + } + + /** + * CreateTransferConfigRequest parent. + * @member {string} parent + * @memberof google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest + * @instance + */ + CreateTransferConfigRequest.prototype.parent = ""; + + /** + * CreateTransferConfigRequest transferConfig. + * @member {google.cloud.bigquery.datatransfer.v1.ITransferConfig|null|undefined} transferConfig + * @memberof google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest + * @instance + */ + CreateTransferConfigRequest.prototype.transferConfig = null; + + /** + * CreateTransferConfigRequest authorizationCode. + * @member {string} authorizationCode + * @memberof google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest + * @instance + */ + CreateTransferConfigRequest.prototype.authorizationCode = ""; + + /** + * CreateTransferConfigRequest versionInfo. + * @member {string} versionInfo + * @memberof google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest + * @instance + */ + CreateTransferConfigRequest.prototype.versionInfo = ""; + + /** + * Creates a new CreateTransferConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.ICreateTransferConfigRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest} CreateTransferConfigRequest instance + */ + CreateTransferConfigRequest.create = function create(properties) { + return new CreateTransferConfigRequest(properties); + }; + + /** + * Encodes the specified CreateTransferConfigRequest message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.ICreateTransferConfigRequest} message CreateTransferConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTransferConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.transferConfig != null && message.hasOwnProperty("transferConfig")) + $root.google.cloud.bigquery.datatransfer.v1.TransferConfig.encode(message.transferConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.authorizationCode != null && message.hasOwnProperty("authorizationCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.authorizationCode); + if (message.versionInfo != null && message.hasOwnProperty("versionInfo")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.versionInfo); + return writer; + }; + + /** + * Encodes the specified CreateTransferConfigRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.ICreateTransferConfigRequest} message CreateTransferConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTransferConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateTransferConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest} CreateTransferConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTransferConfigRequest.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.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.transferConfig = $root.google.cloud.bigquery.datatransfer.v1.TransferConfig.decode(reader, reader.uint32()); + break; + case 3: + message.authorizationCode = reader.string(); + break; + case 5: + message.versionInfo = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateTransferConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest} CreateTransferConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTransferConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateTransferConfigRequest message. + * @function verify + * @memberof google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateTransferConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.transferConfig != null && message.hasOwnProperty("transferConfig")) { + var error = $root.google.cloud.bigquery.datatransfer.v1.TransferConfig.verify(message.transferConfig); + if (error) + return "transferConfig." + error; + } + if (message.authorizationCode != null && message.hasOwnProperty("authorizationCode")) + if (!$util.isString(message.authorizationCode)) + return "authorizationCode: string expected"; + if (message.versionInfo != null && message.hasOwnProperty("versionInfo")) + if (!$util.isString(message.versionInfo)) + return "versionInfo: string expected"; + return null; + }; + + /** + * Creates a CreateTransferConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest} CreateTransferConfigRequest + */ + CreateTransferConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest) + return object; + var message = new $root.google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.transferConfig != null) { + if (typeof object.transferConfig !== "object") + throw TypeError(".google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest.transferConfig: object expected"); + message.transferConfig = $root.google.cloud.bigquery.datatransfer.v1.TransferConfig.fromObject(object.transferConfig); + } + if (object.authorizationCode != null) + message.authorizationCode = String(object.authorizationCode); + if (object.versionInfo != null) + message.versionInfo = String(object.versionInfo); + return message; + }; + + /** + * Creates a plain object from a CreateTransferConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest} message CreateTransferConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateTransferConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.transferConfig = null; + object.authorizationCode = ""; + object.versionInfo = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.transferConfig != null && message.hasOwnProperty("transferConfig")) + object.transferConfig = $root.google.cloud.bigquery.datatransfer.v1.TransferConfig.toObject(message.transferConfig, options); + if (message.authorizationCode != null && message.hasOwnProperty("authorizationCode")) + object.authorizationCode = message.authorizationCode; + if (message.versionInfo != null && message.hasOwnProperty("versionInfo")) + object.versionInfo = message.versionInfo; + return object; + }; + + /** + * Converts this CreateTransferConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest + * @instance + * @returns {Object.} JSON object + */ + CreateTransferConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateTransferConfigRequest; + })(); + + v1.UpdateTransferConfigRequest = (function() { + + /** + * Properties of an UpdateTransferConfigRequest. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @interface IUpdateTransferConfigRequest + * @property {google.cloud.bigquery.datatransfer.v1.ITransferConfig|null} [transferConfig] UpdateTransferConfigRequest transferConfig + * @property {string|null} [authorizationCode] UpdateTransferConfigRequest authorizationCode + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTransferConfigRequest updateMask + * @property {string|null} [versionInfo] UpdateTransferConfigRequest versionInfo + */ + + /** + * Constructs a new UpdateTransferConfigRequest. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @classdesc Represents an UpdateTransferConfigRequest. + * @implements IUpdateTransferConfigRequest + * @constructor + * @param {google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest=} [properties] Properties to set + */ + function UpdateTransferConfigRequest(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]]; + } + + /** + * UpdateTransferConfigRequest transferConfig. + * @member {google.cloud.bigquery.datatransfer.v1.ITransferConfig|null|undefined} transferConfig + * @memberof google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest + * @instance + */ + UpdateTransferConfigRequest.prototype.transferConfig = null; + + /** + * UpdateTransferConfigRequest authorizationCode. + * @member {string} authorizationCode + * @memberof google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest + * @instance + */ + UpdateTransferConfigRequest.prototype.authorizationCode = ""; + + /** + * UpdateTransferConfigRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest + * @instance + */ + UpdateTransferConfigRequest.prototype.updateMask = null; + + /** + * UpdateTransferConfigRequest versionInfo. + * @member {string} versionInfo + * @memberof google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest + * @instance + */ + UpdateTransferConfigRequest.prototype.versionInfo = ""; + + /** + * Creates a new UpdateTransferConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest} UpdateTransferConfigRequest instance + */ + UpdateTransferConfigRequest.create = function create(properties) { + return new UpdateTransferConfigRequest(properties); + }; + + /** + * Encodes the specified UpdateTransferConfigRequest message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest} message UpdateTransferConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateTransferConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.transferConfig != null && message.hasOwnProperty("transferConfig")) + $root.google.cloud.bigquery.datatransfer.v1.TransferConfig.encode(message.transferConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.authorizationCode != null && message.hasOwnProperty("authorizationCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.authorizationCode); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.versionInfo != null && message.hasOwnProperty("versionInfo")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.versionInfo); + return writer; + }; + + /** + * Encodes the specified UpdateTransferConfigRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest} message UpdateTransferConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateTransferConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateTransferConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest} UpdateTransferConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateTransferConfigRequest.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.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.transferConfig = $root.google.cloud.bigquery.datatransfer.v1.TransferConfig.decode(reader, reader.uint32()); + break; + case 3: + message.authorizationCode = reader.string(); + break; + case 4: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 5: + message.versionInfo = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateTransferConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest} UpdateTransferConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateTransferConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateTransferConfigRequest message. + * @function verify + * @memberof google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateTransferConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.transferConfig != null && message.hasOwnProperty("transferConfig")) { + var error = $root.google.cloud.bigquery.datatransfer.v1.TransferConfig.verify(message.transferConfig); + if (error) + return "transferConfig." + error; + } + if (message.authorizationCode != null && message.hasOwnProperty("authorizationCode")) + if (!$util.isString(message.authorizationCode)) + return "authorizationCode: string expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.versionInfo != null && message.hasOwnProperty("versionInfo")) + if (!$util.isString(message.versionInfo)) + return "versionInfo: string expected"; + return null; + }; + + /** + * Creates an UpdateTransferConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest} UpdateTransferConfigRequest + */ + UpdateTransferConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest) + return object; + var message = new $root.google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest(); + if (object.transferConfig != null) { + if (typeof object.transferConfig !== "object") + throw TypeError(".google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest.transferConfig: object expected"); + message.transferConfig = $root.google.cloud.bigquery.datatransfer.v1.TransferConfig.fromObject(object.transferConfig); + } + if (object.authorizationCode != null) + message.authorizationCode = String(object.authorizationCode); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.versionInfo != null) + message.versionInfo = String(object.versionInfo); + return message; + }; + + /** + * Creates a plain object from an UpdateTransferConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest} message UpdateTransferConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateTransferConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.transferConfig = null; + object.authorizationCode = ""; + object.updateMask = null; + object.versionInfo = ""; + } + if (message.transferConfig != null && message.hasOwnProperty("transferConfig")) + object.transferConfig = $root.google.cloud.bigquery.datatransfer.v1.TransferConfig.toObject(message.transferConfig, options); + if (message.authorizationCode != null && message.hasOwnProperty("authorizationCode")) + object.authorizationCode = message.authorizationCode; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.versionInfo != null && message.hasOwnProperty("versionInfo")) + object.versionInfo = message.versionInfo; + return object; + }; + + /** + * Converts this UpdateTransferConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateTransferConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateTransferConfigRequest; + })(); + + v1.GetTransferConfigRequest = (function() { + + /** + * Properties of a GetTransferConfigRequest. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @interface IGetTransferConfigRequest + * @property {string|null} [name] GetTransferConfigRequest name + */ + + /** + * Constructs a new GetTransferConfigRequest. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @classdesc Represents a GetTransferConfigRequest. + * @implements IGetTransferConfigRequest + * @constructor + * @param {google.cloud.bigquery.datatransfer.v1.IGetTransferConfigRequest=} [properties] Properties to set + */ + function GetTransferConfigRequest(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]]; + } + + /** + * GetTransferConfigRequest name. + * @member {string} name + * @memberof google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest + * @instance + */ + GetTransferConfigRequest.prototype.name = ""; + + /** + * Creates a new GetTransferConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IGetTransferConfigRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest} GetTransferConfigRequest instance + */ + GetTransferConfigRequest.create = function create(properties) { + return new GetTransferConfigRequest(properties); + }; + + /** + * Encodes the specified GetTransferConfigRequest message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IGetTransferConfigRequest} message GetTransferConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTransferConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetTransferConfigRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IGetTransferConfigRequest} message GetTransferConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTransferConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetTransferConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest} GetTransferConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTransferConfigRequest.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.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetTransferConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest} GetTransferConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTransferConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetTransferConfigRequest message. + * @function verify + * @memberof google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetTransferConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetTransferConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest} GetTransferConfigRequest + */ + GetTransferConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest) + return object; + var message = new $root.google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetTransferConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest} message GetTransferConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetTransferConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetTransferConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest + * @instance + * @returns {Object.} JSON object + */ + GetTransferConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetTransferConfigRequest; + })(); + + v1.DeleteTransferConfigRequest = (function() { + + /** + * Properties of a DeleteTransferConfigRequest. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @interface IDeleteTransferConfigRequest + * @property {string|null} [name] DeleteTransferConfigRequest name + */ + + /** + * Constructs a new DeleteTransferConfigRequest. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @classdesc Represents a DeleteTransferConfigRequest. + * @implements IDeleteTransferConfigRequest + * @constructor + * @param {google.cloud.bigquery.datatransfer.v1.IDeleteTransferConfigRequest=} [properties] Properties to set + */ + function DeleteTransferConfigRequest(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]]; + } + + /** + * DeleteTransferConfigRequest name. + * @member {string} name + * @memberof google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest + * @instance + */ + DeleteTransferConfigRequest.prototype.name = ""; + + /** + * Creates a new DeleteTransferConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IDeleteTransferConfigRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest} DeleteTransferConfigRequest instance + */ + DeleteTransferConfigRequest.create = function create(properties) { + return new DeleteTransferConfigRequest(properties); + }; + + /** + * Encodes the specified DeleteTransferConfigRequest message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IDeleteTransferConfigRequest} message DeleteTransferConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteTransferConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteTransferConfigRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IDeleteTransferConfigRequest} message DeleteTransferConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteTransferConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteTransferConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest} DeleteTransferConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteTransferConfigRequest.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.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteTransferConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest} DeleteTransferConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteTransferConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteTransferConfigRequest message. + * @function verify + * @memberof google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteTransferConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteTransferConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest} DeleteTransferConfigRequest + */ + DeleteTransferConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest) + return object; + var message = new $root.google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteTransferConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest} message DeleteTransferConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteTransferConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteTransferConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteTransferConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteTransferConfigRequest; + })(); + + v1.GetTransferRunRequest = (function() { + + /** + * Properties of a GetTransferRunRequest. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @interface IGetTransferRunRequest + * @property {string|null} [name] GetTransferRunRequest name + */ + + /** + * Constructs a new GetTransferRunRequest. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @classdesc Represents a GetTransferRunRequest. + * @implements IGetTransferRunRequest + * @constructor + * @param {google.cloud.bigquery.datatransfer.v1.IGetTransferRunRequest=} [properties] Properties to set + */ + function GetTransferRunRequest(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]]; + } + + /** + * GetTransferRunRequest name. + * @member {string} name + * @memberof google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest + * @instance + */ + GetTransferRunRequest.prototype.name = ""; + + /** + * Creates a new GetTransferRunRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IGetTransferRunRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest} GetTransferRunRequest instance + */ + GetTransferRunRequest.create = function create(properties) { + return new GetTransferRunRequest(properties); + }; + + /** + * Encodes the specified GetTransferRunRequest message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IGetTransferRunRequest} message GetTransferRunRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTransferRunRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetTransferRunRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IGetTransferRunRequest} message GetTransferRunRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTransferRunRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetTransferRunRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest} GetTransferRunRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTransferRunRequest.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.cloud.bigquery.datatransfer.v1.GetTransferRunRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetTransferRunRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest} GetTransferRunRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTransferRunRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetTransferRunRequest message. + * @function verify + * @memberof google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetTransferRunRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetTransferRunRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest} GetTransferRunRequest + */ + GetTransferRunRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest) + return object; + var message = new $root.google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetTransferRunRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest} message GetTransferRunRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetTransferRunRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetTransferRunRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest + * @instance + * @returns {Object.} JSON object + */ + GetTransferRunRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetTransferRunRequest; + })(); + + v1.DeleteTransferRunRequest = (function() { + + /** + * Properties of a DeleteTransferRunRequest. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @interface IDeleteTransferRunRequest + * @property {string|null} [name] DeleteTransferRunRequest name + */ + + /** + * Constructs a new DeleteTransferRunRequest. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @classdesc Represents a DeleteTransferRunRequest. + * @implements IDeleteTransferRunRequest + * @constructor + * @param {google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest=} [properties] Properties to set + */ + function DeleteTransferRunRequest(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]]; + } + + /** + * DeleteTransferRunRequest name. + * @member {string} name + * @memberof google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest + * @instance + */ + DeleteTransferRunRequest.prototype.name = ""; + + /** + * Creates a new DeleteTransferRunRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest} DeleteTransferRunRequest instance + */ + DeleteTransferRunRequest.create = function create(properties) { + return new DeleteTransferRunRequest(properties); + }; + + /** + * Encodes the specified DeleteTransferRunRequest message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest} message DeleteTransferRunRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteTransferRunRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteTransferRunRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest} message DeleteTransferRunRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteTransferRunRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteTransferRunRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest} DeleteTransferRunRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteTransferRunRequest.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.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteTransferRunRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest} DeleteTransferRunRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteTransferRunRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteTransferRunRequest message. + * @function verify + * @memberof google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteTransferRunRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteTransferRunRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest} DeleteTransferRunRequest + */ + DeleteTransferRunRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest) + return object; + var message = new $root.google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteTransferRunRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest} message DeleteTransferRunRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteTransferRunRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteTransferRunRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteTransferRunRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteTransferRunRequest; + })(); + + v1.ListTransferConfigsRequest = (function() { + + /** + * Properties of a ListTransferConfigsRequest. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @interface IListTransferConfigsRequest + * @property {string|null} [parent] ListTransferConfigsRequest parent + * @property {Array.|null} [dataSourceIds] ListTransferConfigsRequest dataSourceIds + * @property {string|null} [pageToken] ListTransferConfigsRequest pageToken + * @property {number|null} [pageSize] ListTransferConfigsRequest pageSize + */ + + /** + * Constructs a new ListTransferConfigsRequest. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @classdesc Represents a ListTransferConfigsRequest. + * @implements IListTransferConfigsRequest + * @constructor + * @param {google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest=} [properties] Properties to set + */ + function ListTransferConfigsRequest(properties) { + this.dataSourceIds = []; + 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]]; + } + + /** + * ListTransferConfigsRequest parent. + * @member {string} parent + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest + * @instance + */ + ListTransferConfigsRequest.prototype.parent = ""; + + /** + * ListTransferConfigsRequest dataSourceIds. + * @member {Array.} dataSourceIds + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest + * @instance + */ + ListTransferConfigsRequest.prototype.dataSourceIds = $util.emptyArray; + + /** + * ListTransferConfigsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest + * @instance + */ + ListTransferConfigsRequest.prototype.pageToken = ""; + + /** + * ListTransferConfigsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest + * @instance + */ + ListTransferConfigsRequest.prototype.pageSize = 0; + + /** + * Creates a new ListTransferConfigsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest} ListTransferConfigsRequest instance + */ + ListTransferConfigsRequest.create = function create(properties) { + return new ListTransferConfigsRequest(properties); + }; + + /** + * Encodes the specified ListTransferConfigsRequest message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest} message ListTransferConfigsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTransferConfigsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.dataSourceIds != null && message.dataSourceIds.length) + for (var i = 0; i < message.dataSourceIds.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataSourceIds[i]); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); + return writer; + }; + + /** + * Encodes the specified ListTransferConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest} message ListTransferConfigsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTransferConfigsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTransferConfigsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest} ListTransferConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTransferConfigsRequest.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.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + if (!(message.dataSourceIds && message.dataSourceIds.length)) + message.dataSourceIds = []; + message.dataSourceIds.push(reader.string()); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.pageSize = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListTransferConfigsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest} ListTransferConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTransferConfigsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTransferConfigsRequest message. + * @function verify + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTransferConfigsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.dataSourceIds != null && message.hasOwnProperty("dataSourceIds")) { + if (!Array.isArray(message.dataSourceIds)) + return "dataSourceIds: array expected"; + for (var i = 0; i < message.dataSourceIds.length; ++i) + if (!$util.isString(message.dataSourceIds[i])) + return "dataSourceIds: string[] expected"; + } + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + return null; + }; + + /** + * Creates a ListTransferConfigsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest} ListTransferConfigsRequest + */ + ListTransferConfigsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest) + return object; + var message = new $root.google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.dataSourceIds) { + if (!Array.isArray(object.dataSourceIds)) + throw TypeError(".google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest.dataSourceIds: array expected"); + message.dataSourceIds = []; + for (var i = 0; i < object.dataSourceIds.length; ++i) + message.dataSourceIds[i] = String(object.dataSourceIds[i]); + } + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + return message; + }; + + /** + * Creates a plain object from a ListTransferConfigsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest} message ListTransferConfigsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTransferConfigsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataSourceIds = []; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.dataSourceIds && message.dataSourceIds.length) { + object.dataSourceIds = []; + for (var j = 0; j < message.dataSourceIds.length; ++j) + object.dataSourceIds[j] = message.dataSourceIds[j]; + } + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + return object; + }; + + /** + * Converts this ListTransferConfigsRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest + * @instance + * @returns {Object.} JSON object + */ + ListTransferConfigsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListTransferConfigsRequest; + })(); + + v1.ListTransferConfigsResponse = (function() { + + /** + * Properties of a ListTransferConfigsResponse. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @interface IListTransferConfigsResponse + * @property {Array.|null} [transferConfigs] ListTransferConfigsResponse transferConfigs + * @property {string|null} [nextPageToken] ListTransferConfigsResponse nextPageToken + */ + + /** + * Constructs a new ListTransferConfigsResponse. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @classdesc Represents a ListTransferConfigsResponse. + * @implements IListTransferConfigsResponse + * @constructor + * @param {google.cloud.bigquery.datatransfer.v1.IListTransferConfigsResponse=} [properties] Properties to set + */ + function ListTransferConfigsResponse(properties) { + this.transferConfigs = []; + 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]]; + } + + /** + * ListTransferConfigsResponse transferConfigs. + * @member {Array.} transferConfigs + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse + * @instance + */ + ListTransferConfigsResponse.prototype.transferConfigs = $util.emptyArray; + + /** + * ListTransferConfigsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse + * @instance + */ + ListTransferConfigsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListTransferConfigsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IListTransferConfigsResponse=} [properties] Properties to set + * @returns {google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse} ListTransferConfigsResponse instance + */ + ListTransferConfigsResponse.create = function create(properties) { + return new ListTransferConfigsResponse(properties); + }; + + /** + * Encodes the specified ListTransferConfigsResponse message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IListTransferConfigsResponse} message ListTransferConfigsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTransferConfigsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.transferConfigs != null && message.transferConfigs.length) + for (var i = 0; i < message.transferConfigs.length; ++i) + $root.google.cloud.bigquery.datatransfer.v1.TransferConfig.encode(message.transferConfigs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListTransferConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IListTransferConfigsResponse} message ListTransferConfigsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTransferConfigsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTransferConfigsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse} ListTransferConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTransferConfigsResponse.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.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.transferConfigs && message.transferConfigs.length)) + message.transferConfigs = []; + message.transferConfigs.push($root.google.cloud.bigquery.datatransfer.v1.TransferConfig.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListTransferConfigsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse} ListTransferConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTransferConfigsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTransferConfigsResponse message. + * @function verify + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTransferConfigsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.transferConfigs != null && message.hasOwnProperty("transferConfigs")) { + if (!Array.isArray(message.transferConfigs)) + return "transferConfigs: array expected"; + for (var i = 0; i < message.transferConfigs.length; ++i) { + var error = $root.google.cloud.bigquery.datatransfer.v1.TransferConfig.verify(message.transferConfigs[i]); + if (error) + return "transferConfigs." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListTransferConfigsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse} ListTransferConfigsResponse + */ + ListTransferConfigsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse) + return object; + var message = new $root.google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse(); + if (object.transferConfigs) { + if (!Array.isArray(object.transferConfigs)) + throw TypeError(".google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse.transferConfigs: array expected"); + message.transferConfigs = []; + for (var i = 0; i < object.transferConfigs.length; ++i) { + if (typeof object.transferConfigs[i] !== "object") + throw TypeError(".google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse.transferConfigs: object expected"); + message.transferConfigs[i] = $root.google.cloud.bigquery.datatransfer.v1.TransferConfig.fromObject(object.transferConfigs[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListTransferConfigsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse + * @static + * @param {google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse} message ListTransferConfigsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTransferConfigsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.transferConfigs = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.transferConfigs && message.transferConfigs.length) { + object.transferConfigs = []; + for (var j = 0; j < message.transferConfigs.length; ++j) + object.transferConfigs[j] = $root.google.cloud.bigquery.datatransfer.v1.TransferConfig.toObject(message.transferConfigs[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListTransferConfigsResponse to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse + * @instance + * @returns {Object.} JSON object + */ + ListTransferConfigsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListTransferConfigsResponse; + })(); + + v1.ListTransferRunsRequest = (function() { + + /** + * Properties of a ListTransferRunsRequest. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @interface IListTransferRunsRequest + * @property {string|null} [parent] ListTransferRunsRequest parent + * @property {Array.|null} [states] ListTransferRunsRequest states + * @property {string|null} [pageToken] ListTransferRunsRequest pageToken + * @property {number|null} [pageSize] ListTransferRunsRequest pageSize + * @property {google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest.RunAttempt|null} [runAttempt] ListTransferRunsRequest runAttempt + */ + + /** + * Constructs a new ListTransferRunsRequest. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @classdesc Represents a ListTransferRunsRequest. + * @implements IListTransferRunsRequest + * @constructor + * @param {google.cloud.bigquery.datatransfer.v1.IListTransferRunsRequest=} [properties] Properties to set + */ + function ListTransferRunsRequest(properties) { + this.states = []; + 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]]; + } + + /** + * ListTransferRunsRequest parent. + * @member {string} parent + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest + * @instance + */ + ListTransferRunsRequest.prototype.parent = ""; + + /** + * ListTransferRunsRequest states. + * @member {Array.} states + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest + * @instance + */ + ListTransferRunsRequest.prototype.states = $util.emptyArray; + + /** + * ListTransferRunsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest + * @instance + */ + ListTransferRunsRequest.prototype.pageToken = ""; + + /** + * ListTransferRunsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest + * @instance + */ + ListTransferRunsRequest.prototype.pageSize = 0; + + /** + * ListTransferRunsRequest runAttempt. + * @member {google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest.RunAttempt} runAttempt + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest + * @instance + */ + ListTransferRunsRequest.prototype.runAttempt = 0; + + /** + * Creates a new ListTransferRunsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IListTransferRunsRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest} ListTransferRunsRequest instance + */ + ListTransferRunsRequest.create = function create(properties) { + return new ListTransferRunsRequest(properties); + }; + + /** + * Encodes the specified ListTransferRunsRequest message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IListTransferRunsRequest} message ListTransferRunsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTransferRunsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.states != null && message.states.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.states.length; ++i) + writer.int32(message.states[i]); + writer.ldelim(); + } + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); + if (message.runAttempt != null && message.hasOwnProperty("runAttempt")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.runAttempt); + return writer; + }; + + /** + * Encodes the specified ListTransferRunsRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IListTransferRunsRequest} message ListTransferRunsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTransferRunsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTransferRunsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest} ListTransferRunsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTransferRunsRequest.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.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + if (!(message.states && message.states.length)) + message.states = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.states.push(reader.int32()); + } else + message.states.push(reader.int32()); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.pageSize = reader.int32(); + break; + case 5: + message.runAttempt = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListTransferRunsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest} ListTransferRunsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTransferRunsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTransferRunsRequest message. + * @function verify + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTransferRunsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.states != null && message.hasOwnProperty("states")) { + if (!Array.isArray(message.states)) + return "states: array expected"; + for (var i = 0; i < message.states.length; ++i) + switch (message.states[i]) { + default: + return "states: enum value[] expected"; + case 0: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + } + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.runAttempt != null && message.hasOwnProperty("runAttempt")) + switch (message.runAttempt) { + default: + return "runAttempt: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a ListTransferRunsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest} ListTransferRunsRequest + */ + ListTransferRunsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest) + return object; + var message = new $root.google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.states) { + if (!Array.isArray(object.states)) + throw TypeError(".google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest.states: array expected"); + message.states = []; + for (var i = 0; i < object.states.length; ++i) + switch (object.states[i]) { + default: + case "TRANSFER_STATE_UNSPECIFIED": + case 0: + message.states[i] = 0; + break; + case "PENDING": + case 2: + message.states[i] = 2; + break; + case "RUNNING": + case 3: + message.states[i] = 3; + break; + case "SUCCEEDED": + case 4: + message.states[i] = 4; + break; + case "FAILED": + case 5: + message.states[i] = 5; + break; + case "CANCELLED": + case 6: + message.states[i] = 6; + break; + } + } + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + switch (object.runAttempt) { + case "RUN_ATTEMPT_UNSPECIFIED": + case 0: + message.runAttempt = 0; + break; + case "LATEST": + case 1: + message.runAttempt = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a ListTransferRunsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest} message ListTransferRunsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTransferRunsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.states = []; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; + object.runAttempt = options.enums === String ? "RUN_ATTEMPT_UNSPECIFIED" : 0; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.states && message.states.length) { + object.states = []; + for (var j = 0; j < message.states.length; ++j) + object.states[j] = options.enums === String ? $root.google.cloud.bigquery.datatransfer.v1.TransferState[message.states[j]] : message.states[j]; + } + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.runAttempt != null && message.hasOwnProperty("runAttempt")) + object.runAttempt = options.enums === String ? $root.google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest.RunAttempt[message.runAttempt] : message.runAttempt; + return object; + }; + + /** + * Converts this ListTransferRunsRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest + * @instance + * @returns {Object.} JSON object + */ + ListTransferRunsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * RunAttempt enum. + * @name google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest.RunAttempt + * @enum {string} + * @property {number} RUN_ATTEMPT_UNSPECIFIED=0 RUN_ATTEMPT_UNSPECIFIED value + * @property {number} LATEST=1 LATEST value + */ + ListTransferRunsRequest.RunAttempt = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RUN_ATTEMPT_UNSPECIFIED"] = 0; + values[valuesById[1] = "LATEST"] = 1; + return values; + })(); + + return ListTransferRunsRequest; + })(); + + v1.ListTransferRunsResponse = (function() { + + /** + * Properties of a ListTransferRunsResponse. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @interface IListTransferRunsResponse + * @property {Array.|null} [transferRuns] ListTransferRunsResponse transferRuns + * @property {string|null} [nextPageToken] ListTransferRunsResponse nextPageToken + */ + + /** + * Constructs a new ListTransferRunsResponse. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @classdesc Represents a ListTransferRunsResponse. + * @implements IListTransferRunsResponse + * @constructor + * @param {google.cloud.bigquery.datatransfer.v1.IListTransferRunsResponse=} [properties] Properties to set + */ + function ListTransferRunsResponse(properties) { + this.transferRuns = []; + 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]]; + } + + /** + * ListTransferRunsResponse transferRuns. + * @member {Array.} transferRuns + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse + * @instance + */ + ListTransferRunsResponse.prototype.transferRuns = $util.emptyArray; + + /** + * ListTransferRunsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse + * @instance + */ + ListTransferRunsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListTransferRunsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IListTransferRunsResponse=} [properties] Properties to set + * @returns {google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse} ListTransferRunsResponse instance + */ + ListTransferRunsResponse.create = function create(properties) { + return new ListTransferRunsResponse(properties); + }; + + /** + * Encodes the specified ListTransferRunsResponse message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IListTransferRunsResponse} message ListTransferRunsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTransferRunsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.transferRuns != null && message.transferRuns.length) + for (var i = 0; i < message.transferRuns.length; ++i) + $root.google.cloud.bigquery.datatransfer.v1.TransferRun.encode(message.transferRuns[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListTransferRunsResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IListTransferRunsResponse} message ListTransferRunsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTransferRunsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTransferRunsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse} ListTransferRunsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTransferRunsResponse.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.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.transferRuns && message.transferRuns.length)) + message.transferRuns = []; + message.transferRuns.push($root.google.cloud.bigquery.datatransfer.v1.TransferRun.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListTransferRunsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse} ListTransferRunsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTransferRunsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTransferRunsResponse message. + * @function verify + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTransferRunsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.transferRuns != null && message.hasOwnProperty("transferRuns")) { + if (!Array.isArray(message.transferRuns)) + return "transferRuns: array expected"; + for (var i = 0; i < message.transferRuns.length; ++i) { + var error = $root.google.cloud.bigquery.datatransfer.v1.TransferRun.verify(message.transferRuns[i]); + if (error) + return "transferRuns." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListTransferRunsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse} ListTransferRunsResponse + */ + ListTransferRunsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse) + return object; + var message = new $root.google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse(); + if (object.transferRuns) { + if (!Array.isArray(object.transferRuns)) + throw TypeError(".google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse.transferRuns: array expected"); + message.transferRuns = []; + for (var i = 0; i < object.transferRuns.length; ++i) { + if (typeof object.transferRuns[i] !== "object") + throw TypeError(".google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse.transferRuns: object expected"); + message.transferRuns[i] = $root.google.cloud.bigquery.datatransfer.v1.TransferRun.fromObject(object.transferRuns[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListTransferRunsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse + * @static + * @param {google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse} message ListTransferRunsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTransferRunsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.transferRuns = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.transferRuns && message.transferRuns.length) { + object.transferRuns = []; + for (var j = 0; j < message.transferRuns.length; ++j) + object.transferRuns[j] = $root.google.cloud.bigquery.datatransfer.v1.TransferRun.toObject(message.transferRuns[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListTransferRunsResponse to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse + * @instance + * @returns {Object.} JSON object + */ + ListTransferRunsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListTransferRunsResponse; + })(); + + v1.ListTransferLogsRequest = (function() { + + /** + * Properties of a ListTransferLogsRequest. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @interface IListTransferLogsRequest + * @property {string|null} [parent] ListTransferLogsRequest parent + * @property {string|null} [pageToken] ListTransferLogsRequest pageToken + * @property {number|null} [pageSize] ListTransferLogsRequest pageSize + * @property {Array.|null} [messageTypes] ListTransferLogsRequest messageTypes + */ + + /** + * Constructs a new ListTransferLogsRequest. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @classdesc Represents a ListTransferLogsRequest. + * @implements IListTransferLogsRequest + * @constructor + * @param {google.cloud.bigquery.datatransfer.v1.IListTransferLogsRequest=} [properties] Properties to set + */ + function ListTransferLogsRequest(properties) { + this.messageTypes = []; + 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]]; + } + + /** + * ListTransferLogsRequest parent. + * @member {string} parent + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest + * @instance + */ + ListTransferLogsRequest.prototype.parent = ""; + + /** + * ListTransferLogsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest + * @instance + */ + ListTransferLogsRequest.prototype.pageToken = ""; + + /** + * ListTransferLogsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest + * @instance + */ + ListTransferLogsRequest.prototype.pageSize = 0; + + /** + * ListTransferLogsRequest messageTypes. + * @member {Array.} messageTypes + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest + * @instance + */ + ListTransferLogsRequest.prototype.messageTypes = $util.emptyArray; + + /** + * Creates a new ListTransferLogsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IListTransferLogsRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest} ListTransferLogsRequest instance + */ + ListTransferLogsRequest.create = function create(properties) { + return new ListTransferLogsRequest(properties); + }; + + /** + * Encodes the specified ListTransferLogsRequest message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IListTransferLogsRequest} message ListTransferLogsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTransferLogsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.pageSize); + if (message.messageTypes != null && message.messageTypes.length) { + writer.uint32(/* id 6, wireType 2 =*/50).fork(); + for (var i = 0; i < message.messageTypes.length; ++i) + writer.int32(message.messageTypes[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ListTransferLogsRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IListTransferLogsRequest} message ListTransferLogsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTransferLogsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTransferLogsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest} ListTransferLogsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTransferLogsRequest.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.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 4: + message.pageToken = reader.string(); + break; + case 5: + message.pageSize = reader.int32(); + break; + case 6: + if (!(message.messageTypes && message.messageTypes.length)) + message.messageTypes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.messageTypes.push(reader.int32()); + } else + message.messageTypes.push(reader.int32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListTransferLogsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest} ListTransferLogsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTransferLogsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTransferLogsRequest message. + * @function verify + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTransferLogsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.messageTypes != null && message.hasOwnProperty("messageTypes")) { + if (!Array.isArray(message.messageTypes)) + return "messageTypes: array expected"; + for (var i = 0; i < message.messageTypes.length; ++i) + switch (message.messageTypes[i]) { + default: + return "messageTypes: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + return null; + }; + + /** + * Creates a ListTransferLogsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest} ListTransferLogsRequest + */ + ListTransferLogsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest) + return object; + var message = new $root.google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.messageTypes) { + if (!Array.isArray(object.messageTypes)) + throw TypeError(".google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest.messageTypes: array expected"); + message.messageTypes = []; + for (var i = 0; i < object.messageTypes.length; ++i) + switch (object.messageTypes[i]) { + default: + case "MESSAGE_SEVERITY_UNSPECIFIED": + case 0: + message.messageTypes[i] = 0; + break; + case "INFO": + case 1: + message.messageTypes[i] = 1; + break; + case "WARNING": + case 2: + message.messageTypes[i] = 2; + break; + case "ERROR": + case 3: + message.messageTypes[i] = 3; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ListTransferLogsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest} message ListTransferLogsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTransferLogsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.messageTypes = []; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.messageTypes && message.messageTypes.length) { + object.messageTypes = []; + for (var j = 0; j < message.messageTypes.length; ++j) + object.messageTypes[j] = options.enums === String ? $root.google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity[message.messageTypes[j]] : message.messageTypes[j]; + } + return object; + }; + + /** + * Converts this ListTransferLogsRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest + * @instance + * @returns {Object.} JSON object + */ + ListTransferLogsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListTransferLogsRequest; + })(); + + v1.ListTransferLogsResponse = (function() { + + /** + * Properties of a ListTransferLogsResponse. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @interface IListTransferLogsResponse + * @property {Array.|null} [transferMessages] ListTransferLogsResponse transferMessages + * @property {string|null} [nextPageToken] ListTransferLogsResponse nextPageToken + */ + + /** + * Constructs a new ListTransferLogsResponse. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @classdesc Represents a ListTransferLogsResponse. + * @implements IListTransferLogsResponse + * @constructor + * @param {google.cloud.bigquery.datatransfer.v1.IListTransferLogsResponse=} [properties] Properties to set + */ + function ListTransferLogsResponse(properties) { + this.transferMessages = []; + 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]]; + } + + /** + * ListTransferLogsResponse transferMessages. + * @member {Array.} transferMessages + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse + * @instance + */ + ListTransferLogsResponse.prototype.transferMessages = $util.emptyArray; + + /** + * ListTransferLogsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse + * @instance + */ + ListTransferLogsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListTransferLogsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IListTransferLogsResponse=} [properties] Properties to set + * @returns {google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse} ListTransferLogsResponse instance + */ + ListTransferLogsResponse.create = function create(properties) { + return new ListTransferLogsResponse(properties); + }; + + /** + * Encodes the specified ListTransferLogsResponse message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IListTransferLogsResponse} message ListTransferLogsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTransferLogsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.transferMessages != null && message.transferMessages.length) + for (var i = 0; i < message.transferMessages.length; ++i) + $root.google.cloud.bigquery.datatransfer.v1.TransferMessage.encode(message.transferMessages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListTransferLogsResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IListTransferLogsResponse} message ListTransferLogsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTransferLogsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTransferLogsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse} ListTransferLogsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTransferLogsResponse.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.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.transferMessages && message.transferMessages.length)) + message.transferMessages = []; + message.transferMessages.push($root.google.cloud.bigquery.datatransfer.v1.TransferMessage.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListTransferLogsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse} ListTransferLogsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTransferLogsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTransferLogsResponse message. + * @function verify + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTransferLogsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.transferMessages != null && message.hasOwnProperty("transferMessages")) { + if (!Array.isArray(message.transferMessages)) + return "transferMessages: array expected"; + for (var i = 0; i < message.transferMessages.length; ++i) { + var error = $root.google.cloud.bigquery.datatransfer.v1.TransferMessage.verify(message.transferMessages[i]); + if (error) + return "transferMessages." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListTransferLogsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse} ListTransferLogsResponse + */ + ListTransferLogsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse) + return object; + var message = new $root.google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse(); + if (object.transferMessages) { + if (!Array.isArray(object.transferMessages)) + throw TypeError(".google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse.transferMessages: array expected"); + message.transferMessages = []; + for (var i = 0; i < object.transferMessages.length; ++i) { + if (typeof object.transferMessages[i] !== "object") + throw TypeError(".google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse.transferMessages: object expected"); + message.transferMessages[i] = $root.google.cloud.bigquery.datatransfer.v1.TransferMessage.fromObject(object.transferMessages[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListTransferLogsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse + * @static + * @param {google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse} message ListTransferLogsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTransferLogsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.transferMessages = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.transferMessages && message.transferMessages.length) { + object.transferMessages = []; + for (var j = 0; j < message.transferMessages.length; ++j) + object.transferMessages[j] = $root.google.cloud.bigquery.datatransfer.v1.TransferMessage.toObject(message.transferMessages[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListTransferLogsResponse to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse + * @instance + * @returns {Object.} JSON object + */ + ListTransferLogsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListTransferLogsResponse; + })(); + + v1.CheckValidCredsRequest = (function() { + + /** + * Properties of a CheckValidCredsRequest. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @interface ICheckValidCredsRequest + * @property {string|null} [name] CheckValidCredsRequest name + */ + + /** + * Constructs a new CheckValidCredsRequest. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @classdesc Represents a CheckValidCredsRequest. + * @implements ICheckValidCredsRequest + * @constructor + * @param {google.cloud.bigquery.datatransfer.v1.ICheckValidCredsRequest=} [properties] Properties to set + */ + function CheckValidCredsRequest(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]]; + } + + /** + * CheckValidCredsRequest name. + * @member {string} name + * @memberof google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest + * @instance + */ + CheckValidCredsRequest.prototype.name = ""; + + /** + * Creates a new CheckValidCredsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.ICheckValidCredsRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest} CheckValidCredsRequest instance + */ + CheckValidCredsRequest.create = function create(properties) { + return new CheckValidCredsRequest(properties); + }; + + /** + * Encodes the specified CheckValidCredsRequest message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.ICheckValidCredsRequest} message CheckValidCredsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckValidCredsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified CheckValidCredsRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.ICheckValidCredsRequest} message CheckValidCredsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckValidCredsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CheckValidCredsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest} CheckValidCredsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckValidCredsRequest.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.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CheckValidCredsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest} CheckValidCredsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckValidCredsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CheckValidCredsRequest message. + * @function verify + * @memberof google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CheckValidCredsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a CheckValidCredsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest} CheckValidCredsRequest + */ + CheckValidCredsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest) + return object; + var message = new $root.google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CheckValidCredsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest} message CheckValidCredsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CheckValidCredsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this CheckValidCredsRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest + * @instance + * @returns {Object.} JSON object + */ + CheckValidCredsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CheckValidCredsRequest; + })(); + + v1.CheckValidCredsResponse = (function() { + + /** + * Properties of a CheckValidCredsResponse. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @interface ICheckValidCredsResponse + * @property {boolean|null} [hasValidCreds] CheckValidCredsResponse hasValidCreds + */ + + /** + * Constructs a new CheckValidCredsResponse. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @classdesc Represents a CheckValidCredsResponse. + * @implements ICheckValidCredsResponse + * @constructor + * @param {google.cloud.bigquery.datatransfer.v1.ICheckValidCredsResponse=} [properties] Properties to set + */ + function CheckValidCredsResponse(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]]; + } + + /** + * CheckValidCredsResponse hasValidCreds. + * @member {boolean} hasValidCreds + * @memberof google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse + * @instance + */ + CheckValidCredsResponse.prototype.hasValidCreds = false; + + /** + * Creates a new CheckValidCredsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse + * @static + * @param {google.cloud.bigquery.datatransfer.v1.ICheckValidCredsResponse=} [properties] Properties to set + * @returns {google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse} CheckValidCredsResponse instance + */ + CheckValidCredsResponse.create = function create(properties) { + return new CheckValidCredsResponse(properties); + }; + + /** + * Encodes the specified CheckValidCredsResponse message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse + * @static + * @param {google.cloud.bigquery.datatransfer.v1.ICheckValidCredsResponse} message CheckValidCredsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckValidCredsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hasValidCreds != null && message.hasOwnProperty("hasValidCreds")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.hasValidCreds); + return writer; + }; + + /** + * Encodes the specified CheckValidCredsResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse + * @static + * @param {google.cloud.bigquery.datatransfer.v1.ICheckValidCredsResponse} message CheckValidCredsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckValidCredsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CheckValidCredsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse} CheckValidCredsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckValidCredsResponse.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.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.hasValidCreds = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CheckValidCredsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse} CheckValidCredsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckValidCredsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CheckValidCredsResponse message. + * @function verify + * @memberof google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CheckValidCredsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hasValidCreds != null && message.hasOwnProperty("hasValidCreds")) + if (typeof message.hasValidCreds !== "boolean") + return "hasValidCreds: boolean expected"; + return null; + }; + + /** + * Creates a CheckValidCredsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse} CheckValidCredsResponse + */ + CheckValidCredsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse) + return object; + var message = new $root.google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse(); + if (object.hasValidCreds != null) + message.hasValidCreds = Boolean(object.hasValidCreds); + return message; + }; + + /** + * Creates a plain object from a CheckValidCredsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse + * @static + * @param {google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse} message CheckValidCredsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CheckValidCredsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.hasValidCreds = false; + if (message.hasValidCreds != null && message.hasOwnProperty("hasValidCreds")) + object.hasValidCreds = message.hasValidCreds; + return object; + }; + + /** + * Converts this CheckValidCredsResponse to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse + * @instance + * @returns {Object.} JSON object + */ + CheckValidCredsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CheckValidCredsResponse; + })(); + + v1.ScheduleTransferRunsRequest = (function() { + + /** + * Properties of a ScheduleTransferRunsRequest. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @interface IScheduleTransferRunsRequest + * @property {string|null} [parent] ScheduleTransferRunsRequest parent + * @property {google.protobuf.ITimestamp|null} [startTime] ScheduleTransferRunsRequest startTime + * @property {google.protobuf.ITimestamp|null} [endTime] ScheduleTransferRunsRequest endTime + */ + + /** + * Constructs a new ScheduleTransferRunsRequest. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @classdesc Represents a ScheduleTransferRunsRequest. + * @implements IScheduleTransferRunsRequest + * @constructor + * @param {google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsRequest=} [properties] Properties to set + */ + function ScheduleTransferRunsRequest(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]]; + } + + /** + * ScheduleTransferRunsRequest parent. + * @member {string} parent + * @memberof google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest + * @instance + */ + ScheduleTransferRunsRequest.prototype.parent = ""; + + /** + * ScheduleTransferRunsRequest startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest + * @instance + */ + ScheduleTransferRunsRequest.prototype.startTime = null; + + /** + * ScheduleTransferRunsRequest endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest + * @instance + */ + ScheduleTransferRunsRequest.prototype.endTime = null; + + /** + * Creates a new ScheduleTransferRunsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest} ScheduleTransferRunsRequest instance + */ + ScheduleTransferRunsRequest.create = function create(properties) { + return new ScheduleTransferRunsRequest(properties); + }; + + /** + * Encodes the specified ScheduleTransferRunsRequest message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsRequest} message ScheduleTransferRunsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScheduleTransferRunsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.startTime != null && message.hasOwnProperty("startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.endTime != null && message.hasOwnProperty("endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ScheduleTransferRunsRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsRequest} message ScheduleTransferRunsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScheduleTransferRunsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ScheduleTransferRunsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest} ScheduleTransferRunsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScheduleTransferRunsRequest.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.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ScheduleTransferRunsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest} ScheduleTransferRunsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScheduleTransferRunsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ScheduleTransferRunsRequest message. + * @function verify + * @memberof google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ScheduleTransferRunsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + return null; + }; + + /** + * Creates a ScheduleTransferRunsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest} ScheduleTransferRunsRequest + */ + ScheduleTransferRunsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest) + return object; + var message = new $root.google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + return message; + }; + + /** + * Creates a plain object from a ScheduleTransferRunsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest} message ScheduleTransferRunsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ScheduleTransferRunsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.startTime = null; + object.endTime = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + return object; + }; + + /** + * Converts this ScheduleTransferRunsRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest + * @instance + * @returns {Object.} JSON object + */ + ScheduleTransferRunsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ScheduleTransferRunsRequest; + })(); + + v1.ScheduleTransferRunsResponse = (function() { + + /** + * Properties of a ScheduleTransferRunsResponse. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @interface IScheduleTransferRunsResponse + * @property {Array.|null} [runs] ScheduleTransferRunsResponse runs + */ + + /** + * Constructs a new ScheduleTransferRunsResponse. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @classdesc Represents a ScheduleTransferRunsResponse. + * @implements IScheduleTransferRunsResponse + * @constructor + * @param {google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsResponse=} [properties] Properties to set + */ + function ScheduleTransferRunsResponse(properties) { + this.runs = []; + 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]]; + } + + /** + * ScheduleTransferRunsResponse runs. + * @member {Array.} runs + * @memberof google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse + * @instance + */ + ScheduleTransferRunsResponse.prototype.runs = $util.emptyArray; + + /** + * Creates a new ScheduleTransferRunsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsResponse=} [properties] Properties to set + * @returns {google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse} ScheduleTransferRunsResponse instance + */ + ScheduleTransferRunsResponse.create = function create(properties) { + return new ScheduleTransferRunsResponse(properties); + }; + + /** + * Encodes the specified ScheduleTransferRunsResponse message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsResponse} message ScheduleTransferRunsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScheduleTransferRunsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.runs != null && message.runs.length) + for (var i = 0; i < message.runs.length; ++i) + $root.google.cloud.bigquery.datatransfer.v1.TransferRun.encode(message.runs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ScheduleTransferRunsResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsResponse} message ScheduleTransferRunsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScheduleTransferRunsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ScheduleTransferRunsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse} ScheduleTransferRunsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScheduleTransferRunsResponse.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.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.runs && message.runs.length)) + message.runs = []; + message.runs.push($root.google.cloud.bigquery.datatransfer.v1.TransferRun.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ScheduleTransferRunsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse} ScheduleTransferRunsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScheduleTransferRunsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ScheduleTransferRunsResponse message. + * @function verify + * @memberof google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ScheduleTransferRunsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.runs != null && message.hasOwnProperty("runs")) { + if (!Array.isArray(message.runs)) + return "runs: array expected"; + for (var i = 0; i < message.runs.length; ++i) { + var error = $root.google.cloud.bigquery.datatransfer.v1.TransferRun.verify(message.runs[i]); + if (error) + return "runs." + error; + } + } + return null; + }; + + /** + * Creates a ScheduleTransferRunsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse} ScheduleTransferRunsResponse + */ + ScheduleTransferRunsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse) + return object; + var message = new $root.google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse(); + if (object.runs) { + if (!Array.isArray(object.runs)) + throw TypeError(".google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse.runs: array expected"); + message.runs = []; + for (var i = 0; i < object.runs.length; ++i) { + if (typeof object.runs[i] !== "object") + throw TypeError(".google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse.runs: object expected"); + message.runs[i] = $root.google.cloud.bigquery.datatransfer.v1.TransferRun.fromObject(object.runs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ScheduleTransferRunsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse + * @static + * @param {google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse} message ScheduleTransferRunsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ScheduleTransferRunsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.runs = []; + if (message.runs && message.runs.length) { + object.runs = []; + for (var j = 0; j < message.runs.length; ++j) + object.runs[j] = $root.google.cloud.bigquery.datatransfer.v1.TransferRun.toObject(message.runs[j], options); + } + return object; + }; + + /** + * Converts this ScheduleTransferRunsResponse to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse + * @instance + * @returns {Object.} JSON object + */ + ScheduleTransferRunsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ScheduleTransferRunsResponse; + })(); + + v1.StartManualTransferRunsRequest = (function() { + + /** + * Properties of a StartManualTransferRunsRequest. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @interface IStartManualTransferRunsRequest + * @property {string|null} [parent] StartManualTransferRunsRequest parent + * @property {google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.ITimeRange|null} [requestedTimeRange] StartManualTransferRunsRequest requestedTimeRange + * @property {google.protobuf.ITimestamp|null} [requestedRunTime] StartManualTransferRunsRequest requestedRunTime + */ + + /** + * Constructs a new StartManualTransferRunsRequest. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @classdesc Represents a StartManualTransferRunsRequest. + * @implements IStartManualTransferRunsRequest + * @constructor + * @param {google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest=} [properties] Properties to set + */ + function StartManualTransferRunsRequest(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]]; + } + + /** + * StartManualTransferRunsRequest parent. + * @member {string} parent + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest + * @instance + */ + StartManualTransferRunsRequest.prototype.parent = ""; + + /** + * StartManualTransferRunsRequest requestedTimeRange. + * @member {google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.ITimeRange|null|undefined} requestedTimeRange + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest + * @instance + */ + StartManualTransferRunsRequest.prototype.requestedTimeRange = null; + + /** + * StartManualTransferRunsRequest requestedRunTime. + * @member {google.protobuf.ITimestamp|null|undefined} requestedRunTime + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest + * @instance + */ + StartManualTransferRunsRequest.prototype.requestedRunTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * StartManualTransferRunsRequest time. + * @member {"requestedTimeRange"|"requestedRunTime"|undefined} time + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest + * @instance + */ + Object.defineProperty(StartManualTransferRunsRequest.prototype, "time", { + get: $util.oneOfGetter($oneOfFields = ["requestedTimeRange", "requestedRunTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new StartManualTransferRunsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest} StartManualTransferRunsRequest instance + */ + StartManualTransferRunsRequest.create = function create(properties) { + return new StartManualTransferRunsRequest(properties); + }; + + /** + * Encodes the specified StartManualTransferRunsRequest message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest} message StartManualTransferRunsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartManualTransferRunsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.requestedTimeRange != null && message.hasOwnProperty("requestedTimeRange")) + $root.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange.encode(message.requestedTimeRange, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestedRunTime != null && message.hasOwnProperty("requestedRunTime")) + $root.google.protobuf.Timestamp.encode(message.requestedRunTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified StartManualTransferRunsRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest} message StartManualTransferRunsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartManualTransferRunsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StartManualTransferRunsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest} StartManualTransferRunsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartManualTransferRunsRequest.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.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 3: + message.requestedTimeRange = $root.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange.decode(reader, reader.uint32()); + break; + case 4: + message.requestedRunTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StartManualTransferRunsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest} StartManualTransferRunsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartManualTransferRunsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StartManualTransferRunsRequest message. + * @function verify + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StartManualTransferRunsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.requestedTimeRange != null && message.hasOwnProperty("requestedTimeRange")) { + properties.time = 1; + { + var error = $root.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange.verify(message.requestedTimeRange); + if (error) + return "requestedTimeRange." + error; + } + } + if (message.requestedRunTime != null && message.hasOwnProperty("requestedRunTime")) { + if (properties.time === 1) + return "time: multiple values"; + properties.time = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.requestedRunTime); + if (error) + return "requestedRunTime." + error; + } + } + return null; + }; + + /** + * Creates a StartManualTransferRunsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest} StartManualTransferRunsRequest + */ + StartManualTransferRunsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest) + return object; + var message = new $root.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.requestedTimeRange != null) { + if (typeof object.requestedTimeRange !== "object") + throw TypeError(".google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.requestedTimeRange: object expected"); + message.requestedTimeRange = $root.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange.fromObject(object.requestedTimeRange); + } + if (object.requestedRunTime != null) { + if (typeof object.requestedRunTime !== "object") + throw TypeError(".google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.requestedRunTime: object expected"); + message.requestedRunTime = $root.google.protobuf.Timestamp.fromObject(object.requestedRunTime); + } + return message; + }; + + /** + * Creates a plain object from a StartManualTransferRunsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest + * @static + * @param {google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest} message StartManualTransferRunsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StartManualTransferRunsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.requestedTimeRange != null && message.hasOwnProperty("requestedTimeRange")) { + object.requestedTimeRange = $root.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange.toObject(message.requestedTimeRange, options); + if (options.oneofs) + object.time = "requestedTimeRange"; + } + if (message.requestedRunTime != null && message.hasOwnProperty("requestedRunTime")) { + object.requestedRunTime = $root.google.protobuf.Timestamp.toObject(message.requestedRunTime, options); + if (options.oneofs) + object.time = "requestedRunTime"; + } + return object; + }; + + /** + * Converts this StartManualTransferRunsRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest + * @instance + * @returns {Object.} JSON object + */ + StartManualTransferRunsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + StartManualTransferRunsRequest.TimeRange = (function() { + + /** + * Properties of a TimeRange. + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest + * @interface ITimeRange + * @property {google.protobuf.ITimestamp|null} [startTime] TimeRange startTime + * @property {google.protobuf.ITimestamp|null} [endTime] TimeRange endTime + */ + + /** + * Constructs a new TimeRange. + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest + * @classdesc Represents a TimeRange. + * @implements ITimeRange + * @constructor + * @param {google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.ITimeRange=} [properties] Properties to set + */ + function TimeRange(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]]; + } + + /** + * TimeRange startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange + * @instance + */ + TimeRange.prototype.startTime = null; + + /** + * TimeRange endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange + * @instance + */ + TimeRange.prototype.endTime = null; + + /** + * Creates a new TimeRange instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange + * @static + * @param {google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.ITimeRange=} [properties] Properties to set + * @returns {google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange} TimeRange instance + */ + TimeRange.create = function create(properties) { + return new TimeRange(properties); + }; + + /** + * Encodes the specified TimeRange message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange + * @static + * @param {google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.ITimeRange} message TimeRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startTime != null && message.hasOwnProperty("startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && message.hasOwnProperty("endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TimeRange message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange + * @static + * @param {google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.ITimeRange} message TimeRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeRange message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange} TimeRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeRange.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.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 2: + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TimeRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange} TimeRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeRange message. + * @function verify + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + return null; + }; + + /** + * Creates a TimeRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange} TimeRange + */ + TimeRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange) + return object; + var message = new $root.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange(); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + return message; + }; + + /** + * Creates a plain object from a TimeRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange + * @static + * @param {google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange} message TimeRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startTime = null; + object.endTime = null; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + return object; + }; + + /** + * Converts this TimeRange to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange + * @instance + * @returns {Object.} JSON object + */ + TimeRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TimeRange; + })(); + + return StartManualTransferRunsRequest; + })(); + + v1.StartManualTransferRunsResponse = (function() { + + /** + * Properties of a StartManualTransferRunsResponse. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @interface IStartManualTransferRunsResponse + * @property {Array.|null} [runs] StartManualTransferRunsResponse runs + */ + + /** + * Constructs a new StartManualTransferRunsResponse. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @classdesc Represents a StartManualTransferRunsResponse. + * @implements IStartManualTransferRunsResponse + * @constructor + * @param {google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsResponse=} [properties] Properties to set + */ + function StartManualTransferRunsResponse(properties) { + this.runs = []; + 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]]; + } + + /** + * StartManualTransferRunsResponse runs. + * @member {Array.} runs + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse + * @instance + */ + StartManualTransferRunsResponse.prototype.runs = $util.emptyArray; + + /** + * Creates a new StartManualTransferRunsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsResponse=} [properties] Properties to set + * @returns {google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse} StartManualTransferRunsResponse instance + */ + StartManualTransferRunsResponse.create = function create(properties) { + return new StartManualTransferRunsResponse(properties); + }; + + /** + * Encodes the specified StartManualTransferRunsResponse message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsResponse} message StartManualTransferRunsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartManualTransferRunsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.runs != null && message.runs.length) + for (var i = 0; i < message.runs.length; ++i) + $root.google.cloud.bigquery.datatransfer.v1.TransferRun.encode(message.runs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified StartManualTransferRunsResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsResponse} message StartManualTransferRunsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartManualTransferRunsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StartManualTransferRunsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse} StartManualTransferRunsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartManualTransferRunsResponse.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.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.runs && message.runs.length)) + message.runs = []; + message.runs.push($root.google.cloud.bigquery.datatransfer.v1.TransferRun.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StartManualTransferRunsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse} StartManualTransferRunsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartManualTransferRunsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StartManualTransferRunsResponse message. + * @function verify + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StartManualTransferRunsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.runs != null && message.hasOwnProperty("runs")) { + if (!Array.isArray(message.runs)) + return "runs: array expected"; + for (var i = 0; i < message.runs.length; ++i) { + var error = $root.google.cloud.bigquery.datatransfer.v1.TransferRun.verify(message.runs[i]); + if (error) + return "runs." + error; + } + } + return null; + }; + + /** + * Creates a StartManualTransferRunsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse} StartManualTransferRunsResponse + */ + StartManualTransferRunsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse) + return object; + var message = new $root.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse(); + if (object.runs) { + if (!Array.isArray(object.runs)) + throw TypeError(".google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse.runs: array expected"); + message.runs = []; + for (var i = 0; i < object.runs.length; ++i) { + if (typeof object.runs[i] !== "object") + throw TypeError(".google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse.runs: object expected"); + message.runs[i] = $root.google.cloud.bigquery.datatransfer.v1.TransferRun.fromObject(object.runs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a StartManualTransferRunsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse + * @static + * @param {google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse} message StartManualTransferRunsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StartManualTransferRunsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.runs = []; + if (message.runs && message.runs.length) { + object.runs = []; + for (var j = 0; j < message.runs.length; ++j) + object.runs[j] = $root.google.cloud.bigquery.datatransfer.v1.TransferRun.toObject(message.runs[j], options); + } + return object; + }; + + /** + * Converts this StartManualTransferRunsResponse to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse + * @instance + * @returns {Object.} JSON object + */ + StartManualTransferRunsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return StartManualTransferRunsResponse; + })(); + + /** + * TransferType enum. + * @name google.cloud.bigquery.datatransfer.v1.TransferType + * @enum {string} + * @property {number} TRANSFER_TYPE_UNSPECIFIED=0 TRANSFER_TYPE_UNSPECIFIED value + * @property {number} BATCH=1 BATCH value + * @property {number} STREAMING=2 STREAMING value + */ + v1.TransferType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TRANSFER_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BATCH"] = 1; + values[valuesById[2] = "STREAMING"] = 2; + return values; + })(); + + /** + * TransferState enum. + * @name google.cloud.bigquery.datatransfer.v1.TransferState + * @enum {string} + * @property {number} TRANSFER_STATE_UNSPECIFIED=0 TRANSFER_STATE_UNSPECIFIED value + * @property {number} PENDING=2 PENDING value + * @property {number} RUNNING=3 RUNNING value + * @property {number} SUCCEEDED=4 SUCCEEDED value + * @property {number} FAILED=5 FAILED value + * @property {number} CANCELLED=6 CANCELLED value + */ + v1.TransferState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TRANSFER_STATE_UNSPECIFIED"] = 0; + values[valuesById[2] = "PENDING"] = 2; + values[valuesById[3] = "RUNNING"] = 3; + values[valuesById[4] = "SUCCEEDED"] = 4; + values[valuesById[5] = "FAILED"] = 5; + values[valuesById[6] = "CANCELLED"] = 6; + return values; + })(); + + v1.ScheduleOptions = (function() { + + /** + * Properties of a ScheduleOptions. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @interface IScheduleOptions + * @property {boolean|null} [disableAutoScheduling] ScheduleOptions disableAutoScheduling + * @property {google.protobuf.ITimestamp|null} [startTime] ScheduleOptions startTime + * @property {google.protobuf.ITimestamp|null} [endTime] ScheduleOptions endTime + */ + + /** + * Constructs a new ScheduleOptions. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @classdesc Represents a ScheduleOptions. + * @implements IScheduleOptions + * @constructor + * @param {google.cloud.bigquery.datatransfer.v1.IScheduleOptions=} [properties] Properties to set + */ + function ScheduleOptions(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]]; + } + + /** + * ScheduleOptions disableAutoScheduling. + * @member {boolean} disableAutoScheduling + * @memberof google.cloud.bigquery.datatransfer.v1.ScheduleOptions + * @instance + */ + ScheduleOptions.prototype.disableAutoScheduling = false; + + /** + * ScheduleOptions startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.bigquery.datatransfer.v1.ScheduleOptions + * @instance + */ + ScheduleOptions.prototype.startTime = null; + + /** + * ScheduleOptions endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.bigquery.datatransfer.v1.ScheduleOptions + * @instance + */ + ScheduleOptions.prototype.endTime = null; + + /** + * Creates a new ScheduleOptions instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datatransfer.v1.ScheduleOptions + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IScheduleOptions=} [properties] Properties to set + * @returns {google.cloud.bigquery.datatransfer.v1.ScheduleOptions} ScheduleOptions instance + */ + ScheduleOptions.create = function create(properties) { + return new ScheduleOptions(properties); + }; + + /** + * Encodes the specified ScheduleOptions message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ScheduleOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datatransfer.v1.ScheduleOptions + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IScheduleOptions} message ScheduleOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScheduleOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startTime != null && message.hasOwnProperty("startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && message.hasOwnProperty("endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.disableAutoScheduling != null && message.hasOwnProperty("disableAutoScheduling")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.disableAutoScheduling); + return writer; + }; + + /** + * Encodes the specified ScheduleOptions message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.ScheduleOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.ScheduleOptions + * @static + * @param {google.cloud.bigquery.datatransfer.v1.IScheduleOptions} message ScheduleOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScheduleOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ScheduleOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datatransfer.v1.ScheduleOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datatransfer.v1.ScheduleOptions} ScheduleOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScheduleOptions.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.cloud.bigquery.datatransfer.v1.ScheduleOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.disableAutoScheduling = reader.bool(); + break; + case 1: + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 2: + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ScheduleOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.ScheduleOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datatransfer.v1.ScheduleOptions} ScheduleOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScheduleOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ScheduleOptions message. + * @function verify + * @memberof google.cloud.bigquery.datatransfer.v1.ScheduleOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ScheduleOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.disableAutoScheduling != null && message.hasOwnProperty("disableAutoScheduling")) + if (typeof message.disableAutoScheduling !== "boolean") + return "disableAutoScheduling: boolean expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + return null; + }; + + /** + * Creates a ScheduleOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datatransfer.v1.ScheduleOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datatransfer.v1.ScheduleOptions} ScheduleOptions + */ + ScheduleOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datatransfer.v1.ScheduleOptions) + return object; + var message = new $root.google.cloud.bigquery.datatransfer.v1.ScheduleOptions(); + if (object.disableAutoScheduling != null) + message.disableAutoScheduling = Boolean(object.disableAutoScheduling); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.bigquery.datatransfer.v1.ScheduleOptions.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.bigquery.datatransfer.v1.ScheduleOptions.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + return message; + }; + + /** + * Creates a plain object from a ScheduleOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datatransfer.v1.ScheduleOptions + * @static + * @param {google.cloud.bigquery.datatransfer.v1.ScheduleOptions} message ScheduleOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ScheduleOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startTime = null; + object.endTime = null; + object.disableAutoScheduling = false; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.disableAutoScheduling != null && message.hasOwnProperty("disableAutoScheduling")) + object.disableAutoScheduling = message.disableAutoScheduling; + return object; + }; + + /** + * Converts this ScheduleOptions to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datatransfer.v1.ScheduleOptions + * @instance + * @returns {Object.} JSON object + */ + ScheduleOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ScheduleOptions; + })(); + + v1.TransferConfig = (function() { + + /** + * Properties of a TransferConfig. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @interface ITransferConfig + * @property {string|null} [name] TransferConfig name + * @property {string|null} [destinationDatasetId] TransferConfig destinationDatasetId + * @property {string|null} [displayName] TransferConfig displayName + * @property {string|null} [dataSourceId] TransferConfig dataSourceId + * @property {google.protobuf.IStruct|null} [params] TransferConfig params + * @property {string|null} [schedule] TransferConfig schedule + * @property {google.cloud.bigquery.datatransfer.v1.IScheduleOptions|null} [scheduleOptions] TransferConfig scheduleOptions + * @property {number|null} [dataRefreshWindowDays] TransferConfig dataRefreshWindowDays + * @property {boolean|null} [disabled] TransferConfig disabled + * @property {google.protobuf.ITimestamp|null} [updateTime] TransferConfig updateTime + * @property {google.protobuf.ITimestamp|null} [nextRunTime] TransferConfig nextRunTime + * @property {google.cloud.bigquery.datatransfer.v1.TransferState|null} [state] TransferConfig state + * @property {number|Long|null} [userId] TransferConfig userId + * @property {string|null} [datasetRegion] TransferConfig datasetRegion + */ + + /** + * Constructs a new TransferConfig. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @classdesc Represents a TransferConfig. + * @implements ITransferConfig + * @constructor + * @param {google.cloud.bigquery.datatransfer.v1.ITransferConfig=} [properties] Properties to set + */ + function TransferConfig(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]]; + } + + /** + * TransferConfig name. + * @member {string} name + * @memberof google.cloud.bigquery.datatransfer.v1.TransferConfig + * @instance + */ + TransferConfig.prototype.name = ""; + + /** + * TransferConfig destinationDatasetId. + * @member {string} destinationDatasetId + * @memberof google.cloud.bigquery.datatransfer.v1.TransferConfig + * @instance + */ + TransferConfig.prototype.destinationDatasetId = ""; + + /** + * TransferConfig displayName. + * @member {string} displayName + * @memberof google.cloud.bigquery.datatransfer.v1.TransferConfig + * @instance + */ + TransferConfig.prototype.displayName = ""; + + /** + * TransferConfig dataSourceId. + * @member {string} dataSourceId + * @memberof google.cloud.bigquery.datatransfer.v1.TransferConfig + * @instance + */ + TransferConfig.prototype.dataSourceId = ""; + + /** + * TransferConfig params. + * @member {google.protobuf.IStruct|null|undefined} params + * @memberof google.cloud.bigquery.datatransfer.v1.TransferConfig + * @instance + */ + TransferConfig.prototype.params = null; + + /** + * TransferConfig schedule. + * @member {string} schedule + * @memberof google.cloud.bigquery.datatransfer.v1.TransferConfig + * @instance + */ + TransferConfig.prototype.schedule = ""; + + /** + * TransferConfig scheduleOptions. + * @member {google.cloud.bigquery.datatransfer.v1.IScheduleOptions|null|undefined} scheduleOptions + * @memberof google.cloud.bigquery.datatransfer.v1.TransferConfig + * @instance + */ + TransferConfig.prototype.scheduleOptions = null; + + /** + * TransferConfig dataRefreshWindowDays. + * @member {number} dataRefreshWindowDays + * @memberof google.cloud.bigquery.datatransfer.v1.TransferConfig + * @instance + */ + TransferConfig.prototype.dataRefreshWindowDays = 0; + + /** + * TransferConfig disabled. + * @member {boolean} disabled + * @memberof google.cloud.bigquery.datatransfer.v1.TransferConfig + * @instance + */ + TransferConfig.prototype.disabled = false; + + /** + * TransferConfig updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.bigquery.datatransfer.v1.TransferConfig + * @instance + */ + TransferConfig.prototype.updateTime = null; + + /** + * TransferConfig nextRunTime. + * @member {google.protobuf.ITimestamp|null|undefined} nextRunTime + * @memberof google.cloud.bigquery.datatransfer.v1.TransferConfig + * @instance + */ + TransferConfig.prototype.nextRunTime = null; + + /** + * TransferConfig state. + * @member {google.cloud.bigquery.datatransfer.v1.TransferState} state + * @memberof google.cloud.bigquery.datatransfer.v1.TransferConfig + * @instance + */ + TransferConfig.prototype.state = 0; + + /** + * TransferConfig userId. + * @member {number|Long} userId + * @memberof google.cloud.bigquery.datatransfer.v1.TransferConfig + * @instance + */ + TransferConfig.prototype.userId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * TransferConfig datasetRegion. + * @member {string} datasetRegion + * @memberof google.cloud.bigquery.datatransfer.v1.TransferConfig + * @instance + */ + TransferConfig.prototype.datasetRegion = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TransferConfig destination. + * @member {"destinationDatasetId"|undefined} destination + * @memberof google.cloud.bigquery.datatransfer.v1.TransferConfig + * @instance + */ + Object.defineProperty(TransferConfig.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["destinationDatasetId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TransferConfig instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datatransfer.v1.TransferConfig + * @static + * @param {google.cloud.bigquery.datatransfer.v1.ITransferConfig=} [properties] Properties to set + * @returns {google.cloud.bigquery.datatransfer.v1.TransferConfig} TransferConfig instance + */ + TransferConfig.create = function create(properties) { + return new TransferConfig(properties); + }; + + /** + * Encodes the specified TransferConfig message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.TransferConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datatransfer.v1.TransferConfig + * @static + * @param {google.cloud.bigquery.datatransfer.v1.ITransferConfig} message TransferConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransferConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.destinationDatasetId != null && message.hasOwnProperty("destinationDatasetId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.destinationDatasetId); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.dataSourceId != null && message.hasOwnProperty("dataSourceId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.dataSourceId); + if (message.schedule != null && message.hasOwnProperty("schedule")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.schedule); + if (message.nextRunTime != null && message.hasOwnProperty("nextRunTime")) + $root.google.protobuf.Timestamp.encode(message.nextRunTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.params != null && message.hasOwnProperty("params")) + $root.google.protobuf.Struct.encode(message.params, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.state != null && message.hasOwnProperty("state")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.state); + if (message.userId != null && message.hasOwnProperty("userId")) + writer.uint32(/* id 11, wireType 0 =*/88).int64(message.userId); + if (message.dataRefreshWindowDays != null && message.hasOwnProperty("dataRefreshWindowDays")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.dataRefreshWindowDays); + if (message.disabled != null && message.hasOwnProperty("disabled")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.disabled); + if (message.datasetRegion != null && message.hasOwnProperty("datasetRegion")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.datasetRegion); + if (message.scheduleOptions != null && message.hasOwnProperty("scheduleOptions")) + $root.google.cloud.bigquery.datatransfer.v1.ScheduleOptions.encode(message.scheduleOptions, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TransferConfig message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.TransferConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.TransferConfig + * @static + * @param {google.cloud.bigquery.datatransfer.v1.ITransferConfig} message TransferConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransferConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TransferConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datatransfer.v1.TransferConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datatransfer.v1.TransferConfig} TransferConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransferConfig.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.cloud.bigquery.datatransfer.v1.TransferConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.destinationDatasetId = reader.string(); + break; + case 3: + message.displayName = reader.string(); + break; + case 5: + message.dataSourceId = reader.string(); + break; + case 9: + message.params = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 7: + message.schedule = reader.string(); + break; + case 24: + message.scheduleOptions = $root.google.cloud.bigquery.datatransfer.v1.ScheduleOptions.decode(reader, reader.uint32()); + break; + case 12: + message.dataRefreshWindowDays = reader.int32(); + break; + case 13: + message.disabled = reader.bool(); + break; + case 4: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 8: + message.nextRunTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.state = reader.int32(); + break; + case 11: + message.userId = reader.int64(); + break; + case 14: + message.datasetRegion = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TransferConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.TransferConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datatransfer.v1.TransferConfig} TransferConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransferConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TransferConfig message. + * @function verify + * @memberof google.cloud.bigquery.datatransfer.v1.TransferConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TransferConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.destinationDatasetId != null && message.hasOwnProperty("destinationDatasetId")) { + properties.destination = 1; + if (!$util.isString(message.destinationDatasetId)) + return "destinationDatasetId: string expected"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.dataSourceId != null && message.hasOwnProperty("dataSourceId")) + if (!$util.isString(message.dataSourceId)) + return "dataSourceId: string expected"; + if (message.params != null && message.hasOwnProperty("params")) { + var error = $root.google.protobuf.Struct.verify(message.params); + if (error) + return "params." + error; + } + if (message.schedule != null && message.hasOwnProperty("schedule")) + if (!$util.isString(message.schedule)) + return "schedule: string expected"; + if (message.scheduleOptions != null && message.hasOwnProperty("scheduleOptions")) { + var error = $root.google.cloud.bigquery.datatransfer.v1.ScheduleOptions.verify(message.scheduleOptions); + if (error) + return "scheduleOptions." + error; + } + if (message.dataRefreshWindowDays != null && message.hasOwnProperty("dataRefreshWindowDays")) + if (!$util.isInteger(message.dataRefreshWindowDays)) + return "dataRefreshWindowDays: integer expected"; + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.nextRunTime != null && message.hasOwnProperty("nextRunTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.nextRunTime); + if (error) + return "nextRunTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isInteger(message.userId) && !(message.userId && $util.isInteger(message.userId.low) && $util.isInteger(message.userId.high))) + return "userId: integer|Long expected"; + if (message.datasetRegion != null && message.hasOwnProperty("datasetRegion")) + if (!$util.isString(message.datasetRegion)) + return "datasetRegion: string expected"; + return null; + }; + + /** + * Creates a TransferConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datatransfer.v1.TransferConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datatransfer.v1.TransferConfig} TransferConfig + */ + TransferConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datatransfer.v1.TransferConfig) + return object; + var message = new $root.google.cloud.bigquery.datatransfer.v1.TransferConfig(); + if (object.name != null) + message.name = String(object.name); + if (object.destinationDatasetId != null) + message.destinationDatasetId = String(object.destinationDatasetId); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.dataSourceId != null) + message.dataSourceId = String(object.dataSourceId); + if (object.params != null) { + if (typeof object.params !== "object") + throw TypeError(".google.cloud.bigquery.datatransfer.v1.TransferConfig.params: object expected"); + message.params = $root.google.protobuf.Struct.fromObject(object.params); + } + if (object.schedule != null) + message.schedule = String(object.schedule); + if (object.scheduleOptions != null) { + if (typeof object.scheduleOptions !== "object") + throw TypeError(".google.cloud.bigquery.datatransfer.v1.TransferConfig.scheduleOptions: object expected"); + message.scheduleOptions = $root.google.cloud.bigquery.datatransfer.v1.ScheduleOptions.fromObject(object.scheduleOptions); + } + if (object.dataRefreshWindowDays != null) + message.dataRefreshWindowDays = object.dataRefreshWindowDays | 0; + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.bigquery.datatransfer.v1.TransferConfig.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.nextRunTime != null) { + if (typeof object.nextRunTime !== "object") + throw TypeError(".google.cloud.bigquery.datatransfer.v1.TransferConfig.nextRunTime: object expected"); + message.nextRunTime = $root.google.protobuf.Timestamp.fromObject(object.nextRunTime); + } + switch (object.state) { + case "TRANSFER_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "PENDING": + case 2: + message.state = 2; + break; + case "RUNNING": + case 3: + message.state = 3; + break; + case "SUCCEEDED": + case 4: + message.state = 4; + break; + case "FAILED": + case 5: + message.state = 5; + break; + case "CANCELLED": + case 6: + message.state = 6; + break; + } + if (object.userId != null) + if ($util.Long) + (message.userId = $util.Long.fromValue(object.userId)).unsigned = false; + else if (typeof object.userId === "string") + message.userId = parseInt(object.userId, 10); + else if (typeof object.userId === "number") + message.userId = object.userId; + else if (typeof object.userId === "object") + message.userId = new $util.LongBits(object.userId.low >>> 0, object.userId.high >>> 0).toNumber(); + if (object.datasetRegion != null) + message.datasetRegion = String(object.datasetRegion); + return message; + }; + + /** + * Creates a plain object from a TransferConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datatransfer.v1.TransferConfig + * @static + * @param {google.cloud.bigquery.datatransfer.v1.TransferConfig} message TransferConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TransferConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.updateTime = null; + object.dataSourceId = ""; + object.schedule = ""; + object.nextRunTime = null; + object.params = null; + object.state = options.enums === String ? "TRANSFER_STATE_UNSPECIFIED" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.userId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.userId = options.longs === String ? "0" : 0; + object.dataRefreshWindowDays = 0; + object.disabled = false; + object.datasetRegion = ""; + object.scheduleOptions = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.destinationDatasetId != null && message.hasOwnProperty("destinationDatasetId")) { + object.destinationDatasetId = message.destinationDatasetId; + if (options.oneofs) + object.destination = "destinationDatasetId"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.dataSourceId != null && message.hasOwnProperty("dataSourceId")) + object.dataSourceId = message.dataSourceId; + if (message.schedule != null && message.hasOwnProperty("schedule")) + object.schedule = message.schedule; + if (message.nextRunTime != null && message.hasOwnProperty("nextRunTime")) + object.nextRunTime = $root.google.protobuf.Timestamp.toObject(message.nextRunTime, options); + if (message.params != null && message.hasOwnProperty("params")) + object.params = $root.google.protobuf.Struct.toObject(message.params, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.bigquery.datatransfer.v1.TransferState[message.state] : message.state; + if (message.userId != null && message.hasOwnProperty("userId")) + if (typeof message.userId === "number") + object.userId = options.longs === String ? String(message.userId) : message.userId; + else + object.userId = options.longs === String ? $util.Long.prototype.toString.call(message.userId) : options.longs === Number ? new $util.LongBits(message.userId.low >>> 0, message.userId.high >>> 0).toNumber() : message.userId; + if (message.dataRefreshWindowDays != null && message.hasOwnProperty("dataRefreshWindowDays")) + object.dataRefreshWindowDays = message.dataRefreshWindowDays; + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + if (message.datasetRegion != null && message.hasOwnProperty("datasetRegion")) + object.datasetRegion = message.datasetRegion; + if (message.scheduleOptions != null && message.hasOwnProperty("scheduleOptions")) + object.scheduleOptions = $root.google.cloud.bigquery.datatransfer.v1.ScheduleOptions.toObject(message.scheduleOptions, options); + return object; + }; + + /** + * Converts this TransferConfig to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datatransfer.v1.TransferConfig + * @instance + * @returns {Object.} JSON object + */ + TransferConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TransferConfig; + })(); + + v1.TransferRun = (function() { + + /** + * Properties of a TransferRun. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @interface ITransferRun + * @property {string|null} [name] TransferRun name + * @property {google.protobuf.ITimestamp|null} [scheduleTime] TransferRun scheduleTime + * @property {google.protobuf.ITimestamp|null} [runTime] TransferRun runTime + * @property {google.rpc.IStatus|null} [errorStatus] TransferRun errorStatus + * @property {google.protobuf.ITimestamp|null} [startTime] TransferRun startTime + * @property {google.protobuf.ITimestamp|null} [endTime] TransferRun endTime + * @property {google.protobuf.ITimestamp|null} [updateTime] TransferRun updateTime + * @property {google.protobuf.IStruct|null} [params] TransferRun params + * @property {string|null} [destinationDatasetId] TransferRun destinationDatasetId + * @property {string|null} [dataSourceId] TransferRun dataSourceId + * @property {google.cloud.bigquery.datatransfer.v1.TransferState|null} [state] TransferRun state + * @property {number|Long|null} [userId] TransferRun userId + * @property {string|null} [schedule] TransferRun schedule + */ + + /** + * Constructs a new TransferRun. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @classdesc Represents a TransferRun. + * @implements ITransferRun + * @constructor + * @param {google.cloud.bigquery.datatransfer.v1.ITransferRun=} [properties] Properties to set + */ + function TransferRun(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]]; + } + + /** + * TransferRun name. + * @member {string} name + * @memberof google.cloud.bigquery.datatransfer.v1.TransferRun + * @instance + */ + TransferRun.prototype.name = ""; + + /** + * TransferRun scheduleTime. + * @member {google.protobuf.ITimestamp|null|undefined} scheduleTime + * @memberof google.cloud.bigquery.datatransfer.v1.TransferRun + * @instance + */ + TransferRun.prototype.scheduleTime = null; + + /** + * TransferRun runTime. + * @member {google.protobuf.ITimestamp|null|undefined} runTime + * @memberof google.cloud.bigquery.datatransfer.v1.TransferRun + * @instance + */ + TransferRun.prototype.runTime = null; + + /** + * TransferRun errorStatus. + * @member {google.rpc.IStatus|null|undefined} errorStatus + * @memberof google.cloud.bigquery.datatransfer.v1.TransferRun + * @instance + */ + TransferRun.prototype.errorStatus = null; + + /** + * TransferRun startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.bigquery.datatransfer.v1.TransferRun + * @instance + */ + TransferRun.prototype.startTime = null; + + /** + * TransferRun endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.bigquery.datatransfer.v1.TransferRun + * @instance + */ + TransferRun.prototype.endTime = null; + + /** + * TransferRun updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.bigquery.datatransfer.v1.TransferRun + * @instance + */ + TransferRun.prototype.updateTime = null; + + /** + * TransferRun params. + * @member {google.protobuf.IStruct|null|undefined} params + * @memberof google.cloud.bigquery.datatransfer.v1.TransferRun + * @instance + */ + TransferRun.prototype.params = null; + + /** + * TransferRun destinationDatasetId. + * @member {string} destinationDatasetId + * @memberof google.cloud.bigquery.datatransfer.v1.TransferRun + * @instance + */ + TransferRun.prototype.destinationDatasetId = ""; + + /** + * TransferRun dataSourceId. + * @member {string} dataSourceId + * @memberof google.cloud.bigquery.datatransfer.v1.TransferRun + * @instance + */ + TransferRun.prototype.dataSourceId = ""; + + /** + * TransferRun state. + * @member {google.cloud.bigquery.datatransfer.v1.TransferState} state + * @memberof google.cloud.bigquery.datatransfer.v1.TransferRun + * @instance + */ + TransferRun.prototype.state = 0; + + /** + * TransferRun userId. + * @member {number|Long} userId + * @memberof google.cloud.bigquery.datatransfer.v1.TransferRun + * @instance + */ + TransferRun.prototype.userId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * TransferRun schedule. + * @member {string} schedule + * @memberof google.cloud.bigquery.datatransfer.v1.TransferRun + * @instance + */ + TransferRun.prototype.schedule = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TransferRun destination. + * @member {"destinationDatasetId"|undefined} destination + * @memberof google.cloud.bigquery.datatransfer.v1.TransferRun + * @instance + */ + Object.defineProperty(TransferRun.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["destinationDatasetId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TransferRun instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datatransfer.v1.TransferRun + * @static + * @param {google.cloud.bigquery.datatransfer.v1.ITransferRun=} [properties] Properties to set + * @returns {google.cloud.bigquery.datatransfer.v1.TransferRun} TransferRun instance + */ + TransferRun.create = function create(properties) { + return new TransferRun(properties); + }; + + /** + * Encodes the specified TransferRun message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.TransferRun.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datatransfer.v1.TransferRun + * @static + * @param {google.cloud.bigquery.datatransfer.v1.ITransferRun} message TransferRun message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransferRun.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.destinationDatasetId != null && message.hasOwnProperty("destinationDatasetId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.destinationDatasetId); + if (message.scheduleTime != null && message.hasOwnProperty("scheduleTime")) + $root.google.protobuf.Timestamp.encode(message.scheduleTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.startTime != null && message.hasOwnProperty("startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.endTime != null && message.hasOwnProperty("endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.dataSourceId != null && message.hasOwnProperty("dataSourceId")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.dataSourceId); + if (message.state != null && message.hasOwnProperty("state")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); + if (message.params != null && message.hasOwnProperty("params")) + $root.google.protobuf.Struct.encode(message.params, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.runTime != null && message.hasOwnProperty("runTime")) + $root.google.protobuf.Timestamp.encode(message.runTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.userId != null && message.hasOwnProperty("userId")) + writer.uint32(/* id 11, wireType 0 =*/88).int64(message.userId); + if (message.schedule != null && message.hasOwnProperty("schedule")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.schedule); + if (message.errorStatus != null && message.hasOwnProperty("errorStatus")) + $root.google.rpc.Status.encode(message.errorStatus, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TransferRun message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.TransferRun.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.TransferRun + * @static + * @param {google.cloud.bigquery.datatransfer.v1.ITransferRun} message TransferRun message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransferRun.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TransferRun message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datatransfer.v1.TransferRun + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datatransfer.v1.TransferRun} TransferRun + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransferRun.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.cloud.bigquery.datatransfer.v1.TransferRun(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.scheduleTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.runTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 21: + message.errorStatus = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + case 4: + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 9: + message.params = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 2: + message.destinationDatasetId = reader.string(); + break; + case 7: + message.dataSourceId = reader.string(); + break; + case 8: + message.state = reader.int32(); + break; + case 11: + message.userId = reader.int64(); + break; + case 12: + message.schedule = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TransferRun message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.TransferRun + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datatransfer.v1.TransferRun} TransferRun + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransferRun.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TransferRun message. + * @function verify + * @memberof google.cloud.bigquery.datatransfer.v1.TransferRun + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TransferRun.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.scheduleTime != null && message.hasOwnProperty("scheduleTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.scheduleTime); + if (error) + return "scheduleTime." + error; + } + if (message.runTime != null && message.hasOwnProperty("runTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.runTime); + if (error) + return "runTime." + error; + } + if (message.errorStatus != null && message.hasOwnProperty("errorStatus")) { + var error = $root.google.rpc.Status.verify(message.errorStatus); + if (error) + return "errorStatus." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.params != null && message.hasOwnProperty("params")) { + var error = $root.google.protobuf.Struct.verify(message.params); + if (error) + return "params." + error; + } + if (message.destinationDatasetId != null && message.hasOwnProperty("destinationDatasetId")) { + properties.destination = 1; + if (!$util.isString(message.destinationDatasetId)) + return "destinationDatasetId: string expected"; + } + if (message.dataSourceId != null && message.hasOwnProperty("dataSourceId")) + if (!$util.isString(message.dataSourceId)) + return "dataSourceId: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isInteger(message.userId) && !(message.userId && $util.isInteger(message.userId.low) && $util.isInteger(message.userId.high))) + return "userId: integer|Long expected"; + if (message.schedule != null && message.hasOwnProperty("schedule")) + if (!$util.isString(message.schedule)) + return "schedule: string expected"; + return null; + }; + + /** + * Creates a TransferRun message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datatransfer.v1.TransferRun + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datatransfer.v1.TransferRun} TransferRun + */ + TransferRun.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datatransfer.v1.TransferRun) + return object; + var message = new $root.google.cloud.bigquery.datatransfer.v1.TransferRun(); + if (object.name != null) + message.name = String(object.name); + if (object.scheduleTime != null) { + if (typeof object.scheduleTime !== "object") + throw TypeError(".google.cloud.bigquery.datatransfer.v1.TransferRun.scheduleTime: object expected"); + message.scheduleTime = $root.google.protobuf.Timestamp.fromObject(object.scheduleTime); + } + if (object.runTime != null) { + if (typeof object.runTime !== "object") + throw TypeError(".google.cloud.bigquery.datatransfer.v1.TransferRun.runTime: object expected"); + message.runTime = $root.google.protobuf.Timestamp.fromObject(object.runTime); + } + if (object.errorStatus != null) { + if (typeof object.errorStatus !== "object") + throw TypeError(".google.cloud.bigquery.datatransfer.v1.TransferRun.errorStatus: object expected"); + message.errorStatus = $root.google.rpc.Status.fromObject(object.errorStatus); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.bigquery.datatransfer.v1.TransferRun.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.bigquery.datatransfer.v1.TransferRun.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.bigquery.datatransfer.v1.TransferRun.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.params != null) { + if (typeof object.params !== "object") + throw TypeError(".google.cloud.bigquery.datatransfer.v1.TransferRun.params: object expected"); + message.params = $root.google.protobuf.Struct.fromObject(object.params); + } + if (object.destinationDatasetId != null) + message.destinationDatasetId = String(object.destinationDatasetId); + if (object.dataSourceId != null) + message.dataSourceId = String(object.dataSourceId); + switch (object.state) { + case "TRANSFER_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "PENDING": + case 2: + message.state = 2; + break; + case "RUNNING": + case 3: + message.state = 3; + break; + case "SUCCEEDED": + case 4: + message.state = 4; + break; + case "FAILED": + case 5: + message.state = 5; + break; + case "CANCELLED": + case 6: + message.state = 6; + break; + } + if (object.userId != null) + if ($util.Long) + (message.userId = $util.Long.fromValue(object.userId)).unsigned = false; + else if (typeof object.userId === "string") + message.userId = parseInt(object.userId, 10); + else if (typeof object.userId === "number") + message.userId = object.userId; + else if (typeof object.userId === "object") + message.userId = new $util.LongBits(object.userId.low >>> 0, object.userId.high >>> 0).toNumber(); + if (object.schedule != null) + message.schedule = String(object.schedule); + return message; + }; + + /** + * Creates a plain object from a TransferRun message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datatransfer.v1.TransferRun + * @static + * @param {google.cloud.bigquery.datatransfer.v1.TransferRun} message TransferRun + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TransferRun.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.scheduleTime = null; + object.startTime = null; + object.endTime = null; + object.updateTime = null; + object.dataSourceId = ""; + object.state = options.enums === String ? "TRANSFER_STATE_UNSPECIFIED" : 0; + object.params = null; + object.runTime = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.userId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.userId = options.longs === String ? "0" : 0; + object.schedule = ""; + object.errorStatus = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.destinationDatasetId != null && message.hasOwnProperty("destinationDatasetId")) { + object.destinationDatasetId = message.destinationDatasetId; + if (options.oneofs) + object.destination = "destinationDatasetId"; + } + if (message.scheduleTime != null && message.hasOwnProperty("scheduleTime")) + object.scheduleTime = $root.google.protobuf.Timestamp.toObject(message.scheduleTime, options); + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.dataSourceId != null && message.hasOwnProperty("dataSourceId")) + object.dataSourceId = message.dataSourceId; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.bigquery.datatransfer.v1.TransferState[message.state] : message.state; + if (message.params != null && message.hasOwnProperty("params")) + object.params = $root.google.protobuf.Struct.toObject(message.params, options); + if (message.runTime != null && message.hasOwnProperty("runTime")) + object.runTime = $root.google.protobuf.Timestamp.toObject(message.runTime, options); + if (message.userId != null && message.hasOwnProperty("userId")) + if (typeof message.userId === "number") + object.userId = options.longs === String ? String(message.userId) : message.userId; + else + object.userId = options.longs === String ? $util.Long.prototype.toString.call(message.userId) : options.longs === Number ? new $util.LongBits(message.userId.low >>> 0, message.userId.high >>> 0).toNumber() : message.userId; + if (message.schedule != null && message.hasOwnProperty("schedule")) + object.schedule = message.schedule; + if (message.errorStatus != null && message.hasOwnProperty("errorStatus")) + object.errorStatus = $root.google.rpc.Status.toObject(message.errorStatus, options); + return object; + }; + + /** + * Converts this TransferRun to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datatransfer.v1.TransferRun + * @instance + * @returns {Object.} JSON object + */ + TransferRun.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TransferRun; + })(); + + v1.TransferMessage = (function() { + + /** + * Properties of a TransferMessage. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @interface ITransferMessage + * @property {google.protobuf.ITimestamp|null} [messageTime] TransferMessage messageTime + * @property {google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity|null} [severity] TransferMessage severity + * @property {string|null} [messageText] TransferMessage messageText + */ + + /** + * Constructs a new TransferMessage. + * @memberof google.cloud.bigquery.datatransfer.v1 + * @classdesc Represents a TransferMessage. + * @implements ITransferMessage + * @constructor + * @param {google.cloud.bigquery.datatransfer.v1.ITransferMessage=} [properties] Properties to set + */ + function TransferMessage(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]]; + } + + /** + * TransferMessage messageTime. + * @member {google.protobuf.ITimestamp|null|undefined} messageTime + * @memberof google.cloud.bigquery.datatransfer.v1.TransferMessage + * @instance + */ + TransferMessage.prototype.messageTime = null; + + /** + * TransferMessage severity. + * @member {google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity} severity + * @memberof google.cloud.bigquery.datatransfer.v1.TransferMessage + * @instance + */ + TransferMessage.prototype.severity = 0; + + /** + * TransferMessage messageText. + * @member {string} messageText + * @memberof google.cloud.bigquery.datatransfer.v1.TransferMessage + * @instance + */ + TransferMessage.prototype.messageText = ""; + + /** + * Creates a new TransferMessage instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datatransfer.v1.TransferMessage + * @static + * @param {google.cloud.bigquery.datatransfer.v1.ITransferMessage=} [properties] Properties to set + * @returns {google.cloud.bigquery.datatransfer.v1.TransferMessage} TransferMessage instance + */ + TransferMessage.create = function create(properties) { + return new TransferMessage(properties); + }; + + /** + * Encodes the specified TransferMessage message. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.TransferMessage.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datatransfer.v1.TransferMessage + * @static + * @param {google.cloud.bigquery.datatransfer.v1.ITransferMessage} message TransferMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransferMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageTime != null && message.hasOwnProperty("messageTime")) + $root.google.protobuf.Timestamp.encode(message.messageTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.severity != null && message.hasOwnProperty("severity")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.severity); + if (message.messageText != null && message.hasOwnProperty("messageText")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.messageText); + return writer; + }; + + /** + * Encodes the specified TransferMessage message, length delimited. Does not implicitly {@link google.cloud.bigquery.datatransfer.v1.TransferMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.TransferMessage + * @static + * @param {google.cloud.bigquery.datatransfer.v1.ITransferMessage} message TransferMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransferMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TransferMessage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datatransfer.v1.TransferMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datatransfer.v1.TransferMessage} TransferMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransferMessage.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.cloud.bigquery.datatransfer.v1.TransferMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.messageTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 2: + message.severity = reader.int32(); + break; + case 3: + message.messageText = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TransferMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datatransfer.v1.TransferMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datatransfer.v1.TransferMessage} TransferMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransferMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TransferMessage message. + * @function verify + * @memberof google.cloud.bigquery.datatransfer.v1.TransferMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TransferMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageTime != null && message.hasOwnProperty("messageTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.messageTime); + if (error) + return "messageTime." + error; + } + if (message.severity != null && message.hasOwnProperty("severity")) + switch (message.severity) { + default: + return "severity: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.messageText != null && message.hasOwnProperty("messageText")) + if (!$util.isString(message.messageText)) + return "messageText: string expected"; + return null; + }; + + /** + * Creates a TransferMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datatransfer.v1.TransferMessage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datatransfer.v1.TransferMessage} TransferMessage + */ + TransferMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datatransfer.v1.TransferMessage) + return object; + var message = new $root.google.cloud.bigquery.datatransfer.v1.TransferMessage(); + if (object.messageTime != null) { + if (typeof object.messageTime !== "object") + throw TypeError(".google.cloud.bigquery.datatransfer.v1.TransferMessage.messageTime: object expected"); + message.messageTime = $root.google.protobuf.Timestamp.fromObject(object.messageTime); + } + switch (object.severity) { + case "MESSAGE_SEVERITY_UNSPECIFIED": + case 0: + message.severity = 0; + break; + case "INFO": + case 1: + message.severity = 1; + break; + case "WARNING": + case 2: + message.severity = 2; + break; + case "ERROR": + case 3: + message.severity = 3; + break; + } + if (object.messageText != null) + message.messageText = String(object.messageText); + return message; + }; + + /** + * Creates a plain object from a TransferMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datatransfer.v1.TransferMessage + * @static + * @param {google.cloud.bigquery.datatransfer.v1.TransferMessage} message TransferMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TransferMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.messageTime = null; + object.severity = options.enums === String ? "MESSAGE_SEVERITY_UNSPECIFIED" : 0; + object.messageText = ""; + } + if (message.messageTime != null && message.hasOwnProperty("messageTime")) + object.messageTime = $root.google.protobuf.Timestamp.toObject(message.messageTime, options); + if (message.severity != null && message.hasOwnProperty("severity")) + object.severity = options.enums === String ? $root.google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity[message.severity] : message.severity; + if (message.messageText != null && message.hasOwnProperty("messageText")) + object.messageText = message.messageText; + return object; + }; + + /** + * Converts this TransferMessage to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datatransfer.v1.TransferMessage + * @instance + * @returns {Object.} JSON object + */ + TransferMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * MessageSeverity enum. + * @name google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity + * @enum {string} + * @property {number} MESSAGE_SEVERITY_UNSPECIFIED=0 MESSAGE_SEVERITY_UNSPECIFIED value + * @property {number} INFO=1 INFO value + * @property {number} WARNING=2 WARNING value + * @property {number} ERROR=3 ERROR value + */ + TransferMessage.MessageSeverity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MESSAGE_SEVERITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "INFO"] = 1; + values[valuesById[2] = "WARNING"] = 2; + values[valuesById[3] = "ERROR"] = 3; + return values; + })(); + + return TransferMessage; + })(); + + return v1; + })(); + + return datatransfer; + })(); + + return bigquery; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + 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]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.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.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + case 2: + message.fullyDecodeReservedExpansion = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + 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]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = ""; + + /** + * HttpRule put. + * @member {string} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = ""; + + /** + * HttpRule post. + * @member {string} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = ""; + + /** + * HttpRule delete. + * @member {string} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = ""; + + /** + * HttpRule patch. + * @member {string} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = ""; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && message.hasOwnProperty("selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && message.hasOwnProperty("get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && message.hasOwnProperty("put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && message.hasOwnProperty("post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && message.hasOwnProperty("delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && message.hasOwnProperty("patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && message.hasOwnProperty("body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && message.hasOwnProperty("custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.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.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.selector = reader.string(); + break; + case 2: + message.get = reader.string(); + break; + case 3: + message.put = reader.string(); + break; + case 4: + message.post = reader.string(); + break; + case 5: + message["delete"] = reader.string(); + break; + case 6: + message.patch = reader.string(); + break; + case 8: + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + case 7: + message.body = reader.string(); + break; + case 12: + message.responseBody = reader.string(); + break; + case 11: + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(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]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && message.hasOwnProperty("kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && message.hasOwnProperty("path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.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.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.kind = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CustomHttpPattern; + })(); + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {string} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + 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]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && message.hasOwnProperty("nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && message.hasOwnProperty("history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.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.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + case 3: + message.nameField = reader.string(); + break; + case 4: + message.history = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.pattern = []; + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {string} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(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]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && message.hasOwnProperty("childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.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.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + message.childType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResourceReference; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + 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]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.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.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FileDescriptorSet; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + 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]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && message.hasOwnProperty("package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && message.hasOwnProperty("syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.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.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message["package"] = reader.string(); + break; + case 3: + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + case 10: + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + case 11: + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + case 4: + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 8: + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + case 9: + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + case 12: + message.syntax = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + 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]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.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.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + case 8: + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + case 9: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + case 10: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(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]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && message.hasOwnProperty("start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && message.hasOwnProperty("end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.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.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(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]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && message.hasOwnProperty("start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && message.hasOwnProperty("end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.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.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.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.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(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]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && message.hasOwnProperty("extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && message.hasOwnProperty("number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && message.hasOwnProperty("label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && message.hasOwnProperty("typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.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.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.number = reader.int32(); + break; + case 4: + message.label = reader.int32(); + break; + case 5: + message.type = reader.int32(); + break; + case 6: + message.typeName = reader.string(); + break; + case 2: + message.extendee = reader.string(); + break; + case 7: + message.defaultValue = reader.string(); + break; + case 9: + message.oneofIndex = reader.int32(); + break; + case 10: + message.jsonName = reader.string(); + break; + case 8: + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + } + switch (object.type) { + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {string} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {string} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(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]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.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.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + 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]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.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.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(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]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && message.hasOwnProperty("start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && message.hasOwnProperty("end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.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.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(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]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && message.hasOwnProperty("number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.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.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.number = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + 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]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.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.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(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]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && message.hasOwnProperty("inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && message.hasOwnProperty("outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.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.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.inputType = reader.string(); + break; + case 3: + message.outputType = reader.string(); + break; + case 4: + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + case 5: + message.clientStreaming = reader.bool(); + break; + case 6: + message.serverStreaming = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions phpGenericServices. + * @member {boolean} phpGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = false; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.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.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.javaPackage = reader.string(); + break; + case 8: + message.javaOuterClassname = reader.string(); + break; + case 10: + message.javaMultipleFiles = reader.bool(); + break; + case 20: + message.javaGenerateEqualsAndHash = reader.bool(); + break; + case 27: + message.javaStringCheckUtf8 = reader.bool(); + break; + case 9: + message.optimizeFor = reader.int32(); + break; + case 11: + message.goPackage = reader.string(); + break; + case 16: + message.ccGenericServices = reader.bool(); + break; + case 17: + message.javaGenericServices = reader.bool(); + break; + case 18: + message.pyGenericServices = reader.bool(); + break; + case 42: + message.phpGenericServices = reader.bool(); + break; + case 23: + message.deprecated = reader.bool(); + break; + case 31: + message.ccEnableArenas = reader.bool(); + break; + case 36: + message.objcClassPrefix = reader.string(); + break; + case 37: + message.csharpNamespace = reader.string(); + break; + case 39: + message.swiftPrefix = reader.string(); + break; + case 40: + message.phpClassPrefix = reader.string(); + break; + case 41: + message.phpNamespace = reader.string(); + break; + case 44: + message.phpMetadataNamespace = reader.string(); + break; + case 45: + message.rubyPackage = reader.string(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (typeof message.phpGenericServices !== "boolean") + return "phpGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.phpGenericServices != null) + message.phpGenericServices = Boolean(object.phpGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = false; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpGenericServices = false; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + object.phpGenericServices = message.phpGenericServices; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {string} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.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.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.messageSetWireFormat = reader.bool(); + break; + case 2: + message.noStandardDescriptorAccessor = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 7: + message.mapEntry = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1053: + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + 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]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && message.hasOwnProperty("ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && message.hasOwnProperty("packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && message.hasOwnProperty("lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && message.hasOwnProperty("jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && message.hasOwnProperty("weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { + writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.int32(message[".google.api.fieldBehavior"][i]); + writer.ldelim(); + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.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.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ctype = reader.int32(); + break; + case 2: + message.packed = reader.bool(); + break; + case 6: + message.jstype = reader.int32(); + break; + case 5: + message.lazy = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 10: + message.weak = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1052: + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + case 1055: + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {string} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {string} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.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.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.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.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.allowAlias = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.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.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.deprecated = false; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.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.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1049: + message[".google.api.defaultHost"] = reader.string(); + break; + case 1050: + message[".google.api.oauthScopes"] = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + 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]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.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.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 34: + message.idempotencyLevel = reader.int32(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 72295728: + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + case 1051: + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {string} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + 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]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.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.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + case 3: + message.identifierValue = reader.string(); + break; + case 4: + message.positiveIntValue = reader.uint64(); + break; + case 5: + message.negativeIntValue = reader.int64(); + break; + case 6: + message.doubleValue = reader.double(); + break; + case 7: + message.stringValue = reader.bytes(); + break; + case 8: + message.aggregateValue = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(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]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.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.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.namePart = reader.string(); + break; + case 2: + message.isExtension = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + 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]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.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.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + 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]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.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.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + case 2: + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + case 3: + message.leadingComments = reader.string(); + break; + case 4: + message.trailingComments = reader.string(); + break; + case 6: + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + 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]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.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.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + 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]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && message.hasOwnProperty("begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && message.hasOwnProperty("end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.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.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + case 2: + message.sourceFile = reader.string(); + break; + case 3: + message.begin = reader.int32(); + break; + case 4: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Struct = (function() { + + /** + * Properties of a Struct. + * @memberof google.protobuf + * @interface IStruct + * @property {Object.|null} [fields] Struct fields + */ + + /** + * Constructs a new Struct. + * @memberof google.protobuf + * @classdesc Represents a Struct. + * @implements IStruct + * @constructor + * @param {google.protobuf.IStruct=} [properties] Properties to set + */ + function Struct(properties) { + this.fields = {}; + 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]]; + } + + /** + * Struct fields. + * @member {Object.} fields + * @memberof google.protobuf.Struct + * @instance + */ + Struct.prototype.fields = $util.emptyObject; + + /** + * Creates a new Struct instance using the specified properties. + * @function create + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct=} [properties] Properties to set + * @returns {google.protobuf.Struct} Struct instance + */ + Struct.create = function create(properties) { + return new Struct(properties); + }; + + /** + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct} message Struct message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Struct.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fields != null && message.hasOwnProperty("fields")) + for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct} message Struct message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Struct.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Struct message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Struct + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Struct} Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Struct.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.protobuf.Struct(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + reader.skip().pos++; + if (message.fields === $util.emptyObject) + message.fields = {}; + key = reader.string(); + reader.pos++; + message.fields[key] = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Struct message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Struct + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Struct} Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Struct.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Struct message. + * @function verify + * @memberof google.protobuf.Struct + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Struct.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!$util.isObject(message.fields)) + return "fields: object expected"; + var key = Object.keys(message.fields); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.fields[key[i]]); + if (error) + return "fields." + error; + } + } + return null; + }; + + /** + * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Struct + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Struct} Struct + */ + Struct.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Struct) + return object; + var message = new $root.google.protobuf.Struct(); + if (object.fields) { + if (typeof object.fields !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields = {}; + for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { + if (typeof object.fields[keys[i]] !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.Struct} message Struct + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Struct.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.fields = {}; + var keys2; + if (message.fields && (keys2 = Object.keys(message.fields)).length) { + object.fields = {}; + for (var j = 0; j < keys2.length; ++j) + object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); + } + return object; + }; + + /** + * Converts this Struct to JSON. + * @function toJSON + * @memberof google.protobuf.Struct + * @instance + * @returns {Object.} JSON object + */ + Struct.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Struct; + })(); + + protobuf.Value = (function() { + + /** + * Properties of a Value. + * @memberof google.protobuf + * @interface IValue + * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue + * @property {number|null} [numberValue] Value numberValue + * @property {string|null} [stringValue] Value stringValue + * @property {boolean|null} [boolValue] Value boolValue + * @property {google.protobuf.IStruct|null} [structValue] Value structValue + * @property {google.protobuf.IListValue|null} [listValue] Value listValue + */ + + /** + * Constructs a new Value. + * @memberof google.protobuf + * @classdesc Represents a Value. + * @implements IValue + * @constructor + * @param {google.protobuf.IValue=} [properties] Properties to set + */ + function Value(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]]; + } + + /** + * Value nullValue. + * @member {google.protobuf.NullValue} nullValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.nullValue = 0; + + /** + * Value numberValue. + * @member {number} numberValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.numberValue = 0; + + /** + * Value stringValue. + * @member {string} stringValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.stringValue = ""; + + /** + * Value boolValue. + * @member {boolean} boolValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.boolValue = false; + + /** + * Value structValue. + * @member {google.protobuf.IStruct|null|undefined} structValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.structValue = null; + + /** + * Value listValue. + * @member {google.protobuf.IListValue|null|undefined} listValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.listValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Value kind. + * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind + * @memberof google.protobuf.Value + * @instance + */ + Object.defineProperty(Value.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.IValue=} [properties] Properties to set + * @returns {google.protobuf.Value} Value instance + */ + Value.create = function create(properties) { + return new Value(properties); + }; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nullValue != null && message.hasOwnProperty("nullValue")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue); + if (message.numberValue != null && message.hasOwnProperty("numberValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue); + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); + if (message.boolValue != null && message.hasOwnProperty("boolValue")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); + if (message.structValue != null && message.hasOwnProperty("structValue")) + $root.google.protobuf.Struct.encode(message.structValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.listValue != null && message.hasOwnProperty("listValue")) + $root.google.protobuf.ListValue.encode(message.listValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.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.protobuf.Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.nullValue = reader.int32(); + break; + case 2: + message.numberValue = reader.double(); + break; + case 3: + message.stringValue = reader.string(); + break; + case 4: + message.boolValue = reader.bool(); + break; + case 5: + message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 6: + message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Value message. + * @function verify + * @memberof google.protobuf.Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + properties.kind = 1; + switch (message.nullValue) { + default: + return "nullValue: enum value expected"; + case 0: + break; + } + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.numberValue !== "number") + return "numberValue: number expected"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.Struct.verify(message.structValue); + if (error) + return "structValue." + error; + } + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.ListValue.verify(message.listValue); + if (error) + return "listValue." + error; + } + } + return null; + }; + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Value} Value + */ + Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Value) + return object; + var message = new $root.google.protobuf.Value(); + switch (object.nullValue) { + case "NULL_VALUE": + case 0: + message.nullValue = 0; + break; + } + if (object.numberValue != null) + message.numberValue = Number(object.numberValue); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.structValue != null) { + if (typeof object.structValue !== "object") + throw TypeError(".google.protobuf.Value.structValue: object expected"); + message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue); + } + if (object.listValue != null) { + if (typeof object.listValue !== "object") + throw TypeError(".google.protobuf.Value.listValue: object expected"); + message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue); + } + return message; + }; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.Value} message Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; + if (options.oneofs) + object.kind = "nullValue"; + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; + if (options.oneofs) + object.kind = "numberValue"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.kind = "stringValue"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.kind = "boolValue"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); + if (options.oneofs) + object.kind = "structValue"; + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); + if (options.oneofs) + object.kind = "listValue"; + } + return object; + }; + + /** + * Converts this Value to JSON. + * @function toJSON + * @memberof google.protobuf.Value + * @instance + * @returns {Object.} JSON object + */ + Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Value; + })(); + + /** + * NullValue enum. + * @name google.protobuf.NullValue + * @enum {string} + * @property {number} NULL_VALUE=0 NULL_VALUE value + */ + protobuf.NullValue = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NULL_VALUE"] = 0; + return values; + })(); + + protobuf.ListValue = (function() { + + /** + * Properties of a ListValue. + * @memberof google.protobuf + * @interface IListValue + * @property {Array.|null} [values] ListValue values + */ + + /** + * Constructs a new ListValue. + * @memberof google.protobuf + * @classdesc Represents a ListValue. + * @implements IListValue + * @constructor + * @param {google.protobuf.IListValue=} [properties] Properties to set + */ + function ListValue(properties) { + this.values = []; + 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]]; + } + + /** + * ListValue values. + * @member {Array.} values + * @memberof google.protobuf.ListValue + * @instance + */ + ListValue.prototype.values = $util.emptyArray; + + /** + * Creates a new ListValue instance using the specified properties. + * @function create + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue=} [properties] Properties to set + * @returns {google.protobuf.ListValue} ListValue instance + */ + ListValue.create = function create(properties) { + return new ListValue(properties); + }; + + /** + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ListValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ListValue} ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListValue.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.protobuf.ListValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ListValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ListValue} ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListValue message. + * @function verify + * @memberof google.protobuf.ListValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.values[i]); + if (error) + return "values." + error; + } + } + return null; + }; + + /** + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ListValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ListValue} ListValue + */ + ListValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ListValue) + return object; + var message = new $root.google.protobuf.ListValue(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.protobuf.ListValue.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".google.protobuf.ListValue.values: object expected"); + message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.ListValue} message ListValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); + } + return object; + }; + + /** + * Converts this ListValue to JSON. + * @function toJSON + * @memberof google.protobuf.ListValue + * @instance + * @returns {Object.} JSON object + */ + ListValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListValue; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(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]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && message.hasOwnProperty("seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && message.hasOwnProperty("nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.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.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Timestamp; + })(); + + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(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]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && message.hasOwnProperty("type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.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.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type_url = reader.string(); + break; + case 2: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Any; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(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]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && message.hasOwnProperty("seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && message.hasOwnProperty("nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.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.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Duration; + })(); + + protobuf.Empty = (function() { + + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(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 Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.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.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Empty; + })(); + + protobuf.FieldMask = (function() { + + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + 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]]; + } + + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; + + /** + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance + */ + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.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.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FieldMask; + })(); + + protobuf.DoubleValue = (function() { + + /** + * Properties of a DoubleValue. + * @memberof google.protobuf + * @interface IDoubleValue + * @property {number|null} [value] DoubleValue value + */ + + /** + * Constructs a new DoubleValue. + * @memberof google.protobuf + * @classdesc Represents a DoubleValue. + * @implements IDoubleValue + * @constructor + * @param {google.protobuf.IDoubleValue=} [properties] Properties to set + */ + function DoubleValue(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]]; + } + + /** + * DoubleValue value. + * @member {number} value + * @memberof google.protobuf.DoubleValue + * @instance + */ + DoubleValue.prototype.value = 0; + + /** + * Creates a new DoubleValue instance using the specified properties. + * @function create + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue=} [properties] Properties to set + * @returns {google.protobuf.DoubleValue} DoubleValue instance + */ + DoubleValue.create = function create(properties) { + return new DoubleValue(properties); + }; + + /** + * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DoubleValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); + return writer; + }; + + /** + * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DoubleValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DoubleValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DoubleValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DoubleValue} DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DoubleValue.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.protobuf.DoubleValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DoubleValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DoubleValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DoubleValue} DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DoubleValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DoubleValue message. + * @function verify + * @memberof google.protobuf.DoubleValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DoubleValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + return null; + }; + + /** + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DoubleValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DoubleValue} DoubleValue + */ + DoubleValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DoubleValue) + return object; + var message = new $root.google.protobuf.DoubleValue(); + if (object.value != null) + message.value = Number(object.value); + return message; + }; + + /** + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.DoubleValue} message DoubleValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DoubleValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + return object; + }; + + /** + * Converts this DoubleValue to JSON. + * @function toJSON + * @memberof google.protobuf.DoubleValue + * @instance + * @returns {Object.} JSON object + */ + DoubleValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DoubleValue; + })(); + + protobuf.FloatValue = (function() { + + /** + * Properties of a FloatValue. + * @memberof google.protobuf + * @interface IFloatValue + * @property {number|null} [value] FloatValue value + */ + + /** + * Constructs a new FloatValue. + * @memberof google.protobuf + * @classdesc Represents a FloatValue. + * @implements IFloatValue + * @constructor + * @param {google.protobuf.IFloatValue=} [properties] Properties to set + */ + function FloatValue(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]]; + } + + /** + * FloatValue value. + * @member {number} value + * @memberof google.protobuf.FloatValue + * @instance + */ + FloatValue.prototype.value = 0; + + /** + * Creates a new FloatValue instance using the specified properties. + * @function create + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue=} [properties] Properties to set + * @returns {google.protobuf.FloatValue} FloatValue instance + */ + FloatValue.create = function create(properties) { + return new FloatValue(properties); + }; + + /** + * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FloatValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); + return writer; + }; + + /** + * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FloatValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FloatValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FloatValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FloatValue} FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FloatValue.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.protobuf.FloatValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.float(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FloatValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FloatValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FloatValue} FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FloatValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FloatValue message. + * @function verify + * @memberof google.protobuf.FloatValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FloatValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + return null; + }; + + /** + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FloatValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FloatValue} FloatValue + */ + FloatValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FloatValue) + return object; + var message = new $root.google.protobuf.FloatValue(); + if (object.value != null) + message.value = Number(object.value); + return message; + }; + + /** + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.FloatValue} message FloatValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FloatValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + return object; + }; + + /** + * Converts this FloatValue to JSON. + * @function toJSON + * @memberof google.protobuf.FloatValue + * @instance + * @returns {Object.} JSON object + */ + FloatValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FloatValue; + })(); + + protobuf.Int64Value = (function() { + + /** + * Properties of an Int64Value. + * @memberof google.protobuf + * @interface IInt64Value + * @property {number|Long|null} [value] Int64Value value + */ + + /** + * Constructs a new Int64Value. + * @memberof google.protobuf + * @classdesc Represents an Int64Value. + * @implements IInt64Value + * @constructor + * @param {google.protobuf.IInt64Value=} [properties] Properties to set + */ + function Int64Value(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]]; + } + + /** + * Int64Value value. + * @member {number|Long} value + * @memberof google.protobuf.Int64Value + * @instance + */ + Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Int64Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value=} [properties] Properties to set + * @returns {google.protobuf.Int64Value} Int64Value instance + */ + Int64Value.create = function create(properties) { + return new Int64Value(properties); + }; + + /** + * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int64Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value); + return writer; + }; + + /** + * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int64Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Int64Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Int64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Int64Value} Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int64Value.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.protobuf.Int64Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Int64Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Int64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Int64Value} Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int64Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Int64Value message. + * @function verify + * @memberof google.protobuf.Int64Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Int64Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; + return null; + }; + + /** + * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Int64Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Int64Value} Int64Value + */ + Int64Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Int64Value) + return object; + var message = new $root.google.protobuf.Int64Value(); + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = false; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.Int64Value} message Int64Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Int64Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; + return object; + }; + + /** + * Converts this Int64Value to JSON. + * @function toJSON + * @memberof google.protobuf.Int64Value + * @instance + * @returns {Object.} JSON object + */ + Int64Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Int64Value; + })(); + + protobuf.UInt64Value = (function() { + + /** + * Properties of a UInt64Value. + * @memberof google.protobuf + * @interface IUInt64Value + * @property {number|Long|null} [value] UInt64Value value + */ + + /** + * Constructs a new UInt64Value. + * @memberof google.protobuf + * @classdesc Represents a UInt64Value. + * @implements IUInt64Value + * @constructor + * @param {google.protobuf.IUInt64Value=} [properties] Properties to set + */ + function UInt64Value(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]]; + } + + /** + * UInt64Value value. + * @member {number|Long} value + * @memberof google.protobuf.UInt64Value + * @instance + */ + UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new UInt64Value instance using the specified properties. + * @function create + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value=} [properties] Properties to set + * @returns {google.protobuf.UInt64Value} UInt64Value instance + */ + UInt64Value.create = function create(properties) { + return new UInt64Value(properties); + }; + + /** + * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt64Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.value); + return writer; + }; + + /** + * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt64Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UInt64Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UInt64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UInt64Value} UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt64Value.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.protobuf.UInt64Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UInt64Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UInt64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UInt64Value} UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt64Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UInt64Value message. + * @function verify + * @memberof google.protobuf.UInt64Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UInt64Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; + return null; + }; + + /** + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UInt64Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UInt64Value} UInt64Value + */ + UInt64Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UInt64Value) + return object; + var message = new $root.google.protobuf.UInt64Value(); + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = true; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.UInt64Value} message UInt64Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UInt64Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; + return object; + }; + + /** + * Converts this UInt64Value to JSON. + * @function toJSON + * @memberof google.protobuf.UInt64Value + * @instance + * @returns {Object.} JSON object + */ + UInt64Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UInt64Value; + })(); + + protobuf.Int32Value = (function() { + + /** + * Properties of an Int32Value. + * @memberof google.protobuf + * @interface IInt32Value + * @property {number|null} [value] Int32Value value + */ + + /** + * Constructs a new Int32Value. + * @memberof google.protobuf + * @classdesc Represents an Int32Value. + * @implements IInt32Value + * @constructor + * @param {google.protobuf.IInt32Value=} [properties] Properties to set + */ + function Int32Value(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]]; + } + + /** + * Int32Value value. + * @member {number} value + * @memberof google.protobuf.Int32Value + * @instance + */ + Int32Value.prototype.value = 0; + + /** + * Creates a new Int32Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value=} [properties] Properties to set + * @returns {google.protobuf.Int32Value} Int32Value instance + */ + Int32Value.create = function create(properties) { + return new Int32Value(properties); + }; + + /** + * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int32Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.value); + return writer; + }; + + /** + * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int32Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Int32Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Int32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Int32Value} Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int32Value.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.protobuf.Int32Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Int32Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Int32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Int32Value} Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int32Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Int32Value message. + * @function verify + * @memberof google.protobuf.Int32Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Int32Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value)) + return "value: integer expected"; + return null; + }; + + /** + * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Int32Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Int32Value} Int32Value + */ + Int32Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Int32Value) + return object; + var message = new $root.google.protobuf.Int32Value(); + if (object.value != null) + message.value = object.value | 0; + return message; + }; + + /** + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.Int32Value} message Int32Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Int32Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this Int32Value to JSON. + * @function toJSON + * @memberof google.protobuf.Int32Value + * @instance + * @returns {Object.} JSON object + */ + Int32Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Int32Value; + })(); + + protobuf.UInt32Value = (function() { + + /** + * Properties of a UInt32Value. + * @memberof google.protobuf + * @interface IUInt32Value + * @property {number|null} [value] UInt32Value value + */ + + /** + * Constructs a new UInt32Value. + * @memberof google.protobuf + * @classdesc Represents a UInt32Value. + * @implements IUInt32Value + * @constructor + * @param {google.protobuf.IUInt32Value=} [properties] Properties to set + */ + function UInt32Value(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]]; + } + + /** + * UInt32Value value. + * @member {number} value + * @memberof google.protobuf.UInt32Value + * @instance + */ + UInt32Value.prototype.value = 0; + + /** + * Creates a new UInt32Value instance using the specified properties. + * @function create + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value=} [properties] Properties to set + * @returns {google.protobuf.UInt32Value} UInt32Value instance + */ + UInt32Value.create = function create(properties) { + return new UInt32Value(properties); + }; + + /** + * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt32Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.value); + return writer; + }; + + /** + * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt32Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UInt32Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UInt32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UInt32Value} UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt32Value.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.protobuf.UInt32Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UInt32Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UInt32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UInt32Value} UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt32Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UInt32Value message. + * @function verify + * @memberof google.protobuf.UInt32Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UInt32Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value)) + return "value: integer expected"; + return null; + }; + + /** + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UInt32Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UInt32Value} UInt32Value + */ + UInt32Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UInt32Value) + return object; + var message = new $root.google.protobuf.UInt32Value(); + if (object.value != null) + message.value = object.value >>> 0; + return message; + }; + + /** + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.UInt32Value} message UInt32Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UInt32Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this UInt32Value to JSON. + * @function toJSON + * @memberof google.protobuf.UInt32Value + * @instance + * @returns {Object.} JSON object + */ + UInt32Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UInt32Value; + })(); + + protobuf.BoolValue = (function() { + + /** + * Properties of a BoolValue. + * @memberof google.protobuf + * @interface IBoolValue + * @property {boolean|null} [value] BoolValue value + */ + + /** + * Constructs a new BoolValue. + * @memberof google.protobuf + * @classdesc Represents a BoolValue. + * @implements IBoolValue + * @constructor + * @param {google.protobuf.IBoolValue=} [properties] Properties to set + */ + function BoolValue(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]]; + } + + /** + * BoolValue value. + * @member {boolean} value + * @memberof google.protobuf.BoolValue + * @instance + */ + BoolValue.prototype.value = false; + + /** + * Creates a new BoolValue instance using the specified properties. + * @function create + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue=} [properties] Properties to set + * @returns {google.protobuf.BoolValue} BoolValue instance + */ + BoolValue.create = function create(properties) { + return new BoolValue(properties); + }; + + /** + * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoolValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.value); + return writer; + }; + + /** + * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoolValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BoolValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.BoolValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.BoolValue} BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoolValue.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.protobuf.BoolValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BoolValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.BoolValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.BoolValue} BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoolValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BoolValue message. + * @function verify + * @memberof google.protobuf.BoolValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BoolValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "boolean") + return "value: boolean expected"; + return null; + }; + + /** + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.BoolValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.BoolValue} BoolValue + */ + BoolValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.BoolValue) + return object; + var message = new $root.google.protobuf.BoolValue(); + if (object.value != null) + message.value = Boolean(object.value); + return message; + }; + + /** + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.BoolValue} message BoolValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BoolValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = false; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this BoolValue to JSON. + * @function toJSON + * @memberof google.protobuf.BoolValue + * @instance + * @returns {Object.} JSON object + */ + BoolValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BoolValue; + })(); + + protobuf.StringValue = (function() { + + /** + * Properties of a StringValue. + * @memberof google.protobuf + * @interface IStringValue + * @property {string|null} [value] StringValue value + */ + + /** + * Constructs a new StringValue. + * @memberof google.protobuf + * @classdesc Represents a StringValue. + * @implements IStringValue + * @constructor + * @param {google.protobuf.IStringValue=} [properties] Properties to set + */ + function StringValue(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]]; + } + + /** + * StringValue value. + * @member {string} value + * @memberof google.protobuf.StringValue + * @instance + */ + StringValue.prototype.value = ""; + + /** + * Creates a new StringValue instance using the specified properties. + * @function create + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue=} [properties] Properties to set + * @returns {google.protobuf.StringValue} StringValue instance + */ + StringValue.create = function create(properties) { + return new StringValue(properties); + }; + + /** + * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + return writer; + }; + + /** + * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StringValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.StringValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.StringValue} StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringValue.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.protobuf.StringValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StringValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.StringValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.StringValue} StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StringValue message. + * @function verify + * @memberof google.protobuf.StringValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StringValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates a StringValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.StringValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.StringValue} StringValue + */ + StringValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.StringValue) + return object; + var message = new $root.google.protobuf.StringValue(); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.StringValue} message StringValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StringValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = ""; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this StringValue to JSON. + * @function toJSON + * @memberof google.protobuf.StringValue + * @instance + * @returns {Object.} JSON object + */ + StringValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return StringValue; + })(); + + protobuf.BytesValue = (function() { + + /** + * Properties of a BytesValue. + * @memberof google.protobuf + * @interface IBytesValue + * @property {Uint8Array|null} [value] BytesValue value + */ + + /** + * Constructs a new BytesValue. + * @memberof google.protobuf + * @classdesc Represents a BytesValue. + * @implements IBytesValue + * @constructor + * @param {google.protobuf.IBytesValue=} [properties] Properties to set + */ + function BytesValue(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]]; + } + + /** + * BytesValue value. + * @member {Uint8Array} value + * @memberof google.protobuf.BytesValue + * @instance + */ + BytesValue.prototype.value = $util.newBuffer([]); + + /** + * Creates a new BytesValue instance using the specified properties. + * @function create + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue=} [properties] Properties to set + * @returns {google.protobuf.BytesValue} BytesValue instance + */ + BytesValue.create = function create(properties) { + return new BytesValue(properties); + }; + + /** + * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BytesValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BytesValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BytesValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.BytesValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.BytesValue} BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BytesValue.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.protobuf.BytesValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BytesValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.BytesValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.BytesValue} BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BytesValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BytesValue message. + * @function verify + * @memberof google.protobuf.BytesValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BytesValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.BytesValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.BytesValue} BytesValue + */ + BytesValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.BytesValue) + return object; + var message = new $root.google.protobuf.BytesValue(); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from a BytesValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.BytesValue} message BytesValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BytesValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this BytesValue to JSON. + * @function toJSON + * @memberof google.protobuf.BytesValue + * @instance + * @returns {Object.} JSON object + */ + BytesValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BytesValue; + })(); + + return protobuf; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { + + /** + * Properties of a Status. + * @memberof google.rpc + * @interface IStatus + * @property {number|null} [code] Status code + * @property {string|null} [message] Status message + * @property {Array.|null} [details] Status details + */ + + /** + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {google.rpc.IStatus=} [properties] Properties to set + */ + function Status(properties) { + this.details = []; + 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]]; + } + + /** + * Status code. + * @member {number} code + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.code = 0; + + /** + * Status message. + * @member {string} message + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.message = ""; + + /** + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.details = $util.emptyArray; + + /** + * Creates a new Status instance using the specified properties. + * @function create + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encode + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && message.hasOwnProperty("code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && message.hasOwnProperty("message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.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.rpc.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.code = reader.int32(); + break; + case 2: + message.message = reader.string(); + break; + case 3: + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Status message. + * @function verify + * @memberof google.rpc.Status + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Status.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.details != null && message.hasOwnProperty("details")) { + if (!Array.isArray(message.details)) + return "details: array expected"; + for (var i = 0; i < message.details.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.details[i]); + if (error) + return "details." + error; + } + } + return null; + }; + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Status + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) + return object; + var message = new $root.google.rpc.Status(); + if (object.code != null) + message.code = object.code | 0; + if (object.message != null) + message.message = String(object.message); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".google.rpc.Status.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".google.rpc.Status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Status + * @static + * @param {google.rpc.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.details = []; + if (options.defaults) { + object.code = 0; + object.message = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + } + return object; + }; + + /** + * Converts this Status to JSON. + * @function toJSON + * @memberof google.rpc.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Status; + })(); + + return rpc; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/google-cloud-bigquery-datatransfer/protos/protos.json b/packages/google-cloud-bigquery-datatransfer/protos/protos.json index 5197923f6a4..5c501edaddf 100644 --- a/packages/google-cloud-bigquery-datatransfer/protos/protos.json +++ b/packages/google-cloud-bigquery-datatransfer/protos/protos.json @@ -30,7 +30,8 @@ "responseType": "DataSource", "options": { "(google.api.http).get": "/v1/{name=projects/*/locations/*/dataSources/*}", - "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/dataSources/*}" + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/dataSources/*}", + "(google.api.method_signature)": "name" } }, "ListDataSources": { @@ -38,7 +39,8 @@ "responseType": "ListDataSourcesResponse", "options": { "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/dataSources", - "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*}/dataSources" + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*}/dataSources", + "(google.api.method_signature)": "parent" } }, "CreateTransferConfig": { @@ -48,7 +50,8 @@ "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/transferConfigs", "(google.api.http).body": "transfer_config", "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*}/transferConfigs", - "(google.api.http).additional_bindings.body": "transfer_config" + "(google.api.http).additional_bindings.body": "transfer_config", + "(google.api.method_signature)": "parent,transfer_config" } }, "UpdateTransferConfig": { @@ -58,7 +61,8 @@ "(google.api.http).patch": "/v1/{transfer_config.name=projects/*/locations/*/transferConfigs/*}", "(google.api.http).body": "transfer_config", "(google.api.http).additional_bindings.patch": "/v1/{transfer_config.name=projects/*/transferConfigs/*}", - "(google.api.http).additional_bindings.body": "transfer_config" + "(google.api.http).additional_bindings.body": "transfer_config", + "(google.api.method_signature)": "transfer_config,update_mask" } }, "DeleteTransferConfig": { @@ -66,7 +70,8 @@ "responseType": "google.protobuf.Empty", "options": { "(google.api.http).delete": "/v1/{name=projects/*/locations/*/transferConfigs/*}", - "(google.api.http).additional_bindings.delete": "/v1/{name=projects/*/transferConfigs/*}" + "(google.api.http).additional_bindings.delete": "/v1/{name=projects/*/transferConfigs/*}", + "(google.api.method_signature)": "name" } }, "GetTransferConfig": { @@ -74,7 +79,8 @@ "responseType": "TransferConfig", "options": { "(google.api.http).get": "/v1/{name=projects/*/locations/*/transferConfigs/*}", - "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/transferConfigs/*}" + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/transferConfigs/*}", + "(google.api.method_signature)": "name" } }, "ListTransferConfigs": { @@ -82,7 +88,8 @@ "responseType": "ListTransferConfigsResponse", "options": { "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/transferConfigs", - "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*}/transferConfigs" + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*}/transferConfigs", + "(google.api.method_signature)": "parent" } }, "ScheduleTransferRuns": { @@ -93,7 +100,8 @@ "(google.api.http).post": "/v1/{parent=projects/*/locations/*/transferConfigs/*}:scheduleRuns", "(google.api.http).body": "*", "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/transferConfigs/*}:scheduleRuns", - "(google.api.http).additional_bindings.body": "*" + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "parent,start_time,end_time" } }, "StartManualTransferRuns": { @@ -111,7 +119,8 @@ "responseType": "TransferRun", "options": { "(google.api.http).get": "/v1/{name=projects/*/locations/*/transferConfigs/*/runs/*}", - "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/transferConfigs/*/runs/*}" + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/transferConfigs/*/runs/*}", + "(google.api.method_signature)": "name" } }, "DeleteTransferRun": { @@ -119,7 +128,8 @@ "responseType": "google.protobuf.Empty", "options": { "(google.api.http).delete": "/v1/{name=projects/*/locations/*/transferConfigs/*/runs/*}", - "(google.api.http).additional_bindings.delete": "/v1/{name=projects/*/transferConfigs/*/runs/*}" + "(google.api.http).additional_bindings.delete": "/v1/{name=projects/*/transferConfigs/*/runs/*}", + "(google.api.method_signature)": "name" } }, "ListTransferRuns": { @@ -127,7 +137,8 @@ "responseType": "ListTransferRunsResponse", "options": { "(google.api.http).get": "/v1/{parent=projects/*/locations/*/transferConfigs/*}/runs", - "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/transferConfigs/*}/runs" + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/transferConfigs/*}/runs", + "(google.api.method_signature)": "parent" } }, "ListTransferLogs": { @@ -135,7 +146,8 @@ "responseType": "ListTransferLogsResponse", "options": { "(google.api.http).get": "/v1/{parent=projects/*/locations/*/transferConfigs/*/runs/*}/transferLogs", - "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/transferConfigs/*/runs/*}/transferLogs" + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/transferConfigs/*/runs/*}/transferLogs", + "(google.api.method_signature)": "parent" } }, "CheckValidCreds": { @@ -145,7 +157,8 @@ "(google.api.http).post": "/v1/{name=projects/*/locations/*/dataSources/*}:checkValidCreds", "(google.api.http).body": "*", "(google.api.http).additional_bindings.post": "/v1/{name=projects/*/dataSources/*}:checkValidCreds", - "(google.api.http).additional_bindings.body": "*" + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "name" } } } @@ -234,10 +247,17 @@ } }, "DataSource": { + "options": { + "(google.api.resource).type": "bigquerydatatransfer.googleapis.com/DataSource", + "(google.api.resource).pattern": "projects/{project}/dataSources/{data_source}" + }, "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "dataSourceId": { "type": "string", @@ -337,7 +357,11 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigquerydatatransfer.googleapis.com/DataSource" + } } } }, @@ -345,7 +369,11 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + } }, "pageToken": { "type": "string", @@ -366,7 +394,10 @@ }, "nextPageToken": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, @@ -374,11 +405,18 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } }, "transferConfig": { "type": "TransferConfig", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "authorizationCode": { "type": "string", @@ -394,7 +432,10 @@ "fields": { "transferConfig": { "type": "TransferConfig", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "authorizationCode": { "type": "string", @@ -402,7 +443,10 @@ }, "updateMask": { "type": "google.protobuf.FieldMask", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "versionInfo": { "type": "string", @@ -414,7 +458,11 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigquerydatatransfer.googleapis.com/TransferConfig" + } } } }, @@ -422,7 +470,11 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigquerydatatransfer.googleapis.com/TransferConfig" + } } } }, @@ -430,7 +482,11 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigquerydatatransfer.googleapis.com/TransferRun" + } } } }, @@ -438,7 +494,11 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigquerydatatransfer.googleapis.com/TransferRun" + } } } }, @@ -446,7 +506,11 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + } }, "dataSourceIds": { "rule": "repeated", @@ -468,11 +532,17 @@ "transferConfigs": { "rule": "repeated", "type": "TransferConfig", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "nextPageToken": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, @@ -480,7 +550,11 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigquerydatatransfer.googleapis.com/TransferConfig" + } }, "states": { "rule": "repeated", @@ -514,11 +588,17 @@ "transferRuns": { "rule": "repeated", "type": "TransferRun", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "nextPageToken": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, @@ -526,7 +606,11 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigquerydatatransfer.googleapis.com/TransferRun" + } }, "pageToken": { "type": "string", @@ -548,11 +632,17 @@ "transferMessages": { "rule": "repeated", "type": "TransferMessage", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "nextPageToken": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, @@ -560,7 +650,11 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigquerydatatransfer.googleapis.com/DataSource" + } } } }, @@ -576,15 +670,25 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigquerydatatransfer.googleapis.com/TransferConfig" + } }, "startTime": { "type": "google.protobuf.Timestamp", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "endTime": { "type": "google.protobuf.Timestamp", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, @@ -609,7 +713,10 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.resource_reference).type": "bigquerydatatransfer.googleapis.com/TransferConfig" + } }, "requestedTimeRange": { "type": "TimeRange", @@ -681,6 +788,17 @@ } }, "TransferConfig": { + "options": { + "(google.api.resource).type": "bigquerydatatransfer.googleapis.com/TransferConfig", + "(google.api.resource).pattern": "projects/{project}/transferConfigs/{transfer_config}" + }, + "oneofs": { + "destination": { + "oneof": [ + "destinationDatasetId" + ] + } + }, "fields": { "name": { "type": "string", @@ -720,15 +838,24 @@ }, "updateTime": { "type": "google.protobuf.Timestamp", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "nextRunTime": { "type": "google.protobuf.Timestamp", - "id": 8 + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "state": { "type": "TransferState", - "id": 10 + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "userId": { "type": "int64", @@ -736,11 +863,25 @@ }, "datasetRegion": { "type": "string", - "id": 14 + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, "TransferRun": { + "options": { + "(google.api.resource).type": "bigquerydatatransfer.googleapis.com/TransferRun", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/transferConfigs/{transfer_config}/runs/{run}" + }, + "oneofs": { + "destination": { + "oneof": [ + "destinationDatasetId" + ] + } + }, "fields": { "name": { "type": "string", @@ -760,27 +901,45 @@ }, "startTime": { "type": "google.protobuf.Timestamp", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "endTime": { "type": "google.protobuf.Timestamp", - "id": 5 + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "updateTime": { "type": "google.protobuf.Timestamp", - "id": 6 + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "params": { "type": "google.protobuf.Struct", - "id": 9 + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "destinationDatasetId": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "dataSourceId": { "type": "string", - "id": 7 + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "state": { "type": "TransferState", @@ -792,7 +951,10 @@ }, "schedule": { "type": "string", - "id": 12 + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, @@ -834,7 +996,7 @@ "options": { "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", "java_multiple_files": true, - "java_outer_classname": "ClientProto", + "java_outer_classname": "ResourceProto", "java_package": "com.google.api", "objc_class_prefix": "GAPI", "cc_enable_arenas": true @@ -942,6 +1104,74 @@ "type": "string", "id": 1050, "extend": "google.protobuf.ServiceOptions" + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } } } }, diff --git a/packages/google-cloud-bigquery-datatransfer/src/v1/data_transfer_service_client.js b/packages/google-cloud-bigquery-datatransfer/src/v1/data_transfer_service_client.js index 44580bf0616..2710abed85c 100644 --- a/packages/google-cloud-bigquery-datatransfer/src/v1/data_transfer_service_client.js +++ b/packages/google-cloud-bigquery-datatransfer/src/v1/data_transfer_service_client.js @@ -287,7 +287,7 @@ class DataTransferServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The field will contain name of the resource requested, for example: + * Required. The field will contain name of the resource requested, for example: * `projects/{project_id}/dataSources/{data_source_id}` * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, @@ -343,7 +343,7 @@ class DataTransferServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The BigQuery project id for which data sources should be returned. + * Required. The BigQuery project id for which data sources should be returned. * Must be in the form: `projects/{project_id}` * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API @@ -456,7 +456,7 @@ class DataTransferServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The BigQuery project id for which data sources should be returned. + * Required. The BigQuery project id for which data sources should be returned. * Must be in the form: `projects/{project_id}` * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API @@ -502,12 +502,12 @@ class DataTransferServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The BigQuery project id where the transfer configuration should be created. + * Required. The BigQuery project id where the transfer configuration should be created. * Must be in the format projects/{project_id}/locations/{location_id} * If specified location and location of the destination bigquery dataset * do not match - the request will fail. * @param {Object} request.transferConfig - * Data transfer configuration to create. + * Required. Data transfer configuration to create. * * This object should have the same structure as [TransferConfig]{@link google.cloud.bigquery.datatransfer.v1.TransferConfig} * @param {string} [request.authorizationCode] @@ -593,11 +593,11 @@ class DataTransferServiceClient { * @param {Object} request * The request object that will be sent. * @param {Object} request.transferConfig - * Data transfer configuration to create. + * Required. Data transfer configuration to create. * * This object should have the same structure as [TransferConfig]{@link google.cloud.bigquery.datatransfer.v1.TransferConfig} * @param {Object} request.updateMask - * Required list of fields to be updated in this request. + * Required. Required list of fields to be updated in this request. * * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} * @param {string} [request.authorizationCode] @@ -683,7 +683,7 @@ class DataTransferServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The field will contain name of the resource requested, for example: + * Required. The field will contain name of the resource requested, for example: * `projects/{project_id}/transferConfigs/{config_id}` * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, @@ -730,7 +730,7 @@ class DataTransferServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The field will contain name of the resource requested, for example: + * Required. The field will contain name of the resource requested, for example: * `projects/{project_id}/transferConfigs/{config_id}` * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, @@ -785,7 +785,7 @@ class DataTransferServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The BigQuery project id for which data sources + * Required. The BigQuery project id for which data sources * should be returned: `projects/{project_id}`. * @param {string[]} [request.dataSourceIds] * When specified, only configurations of requested data sources are returned. @@ -900,7 +900,7 @@ class DataTransferServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The BigQuery project id for which data sources + * Required. The BigQuery project id for which data sources * should be returned: `projects/{project_id}`. * @param {string[]} [request.dataSourceIds] * When specified, only configurations of requested data sources are returned. @@ -952,15 +952,15 @@ class DataTransferServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Transfer configuration name in the form: + * Required. Transfer configuration name in the form: * `projects/{project_id}/transferConfigs/{config_id}`. * @param {Object} request.startTime - * Start time of the range of transfer runs. For example, + * Required. Start time of the range of transfer runs. For example, * `"2017-05-25T00:00:00+00:00"`. * * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} * @param {Object} request.endTime - * End time of the range of transfer runs. For example, + * Required. End time of the range of transfer runs. For example, * `"2017-05-30T00:00:00+00:00"`. * * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} @@ -1024,7 +1024,7 @@ class DataTransferServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The field will contain name of the resource requested, for example: + * Required. The field will contain name of the resource requested, for example: * `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, @@ -1079,7 +1079,7 @@ class DataTransferServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The field will contain name of the resource requested, for example: + * Required. The field will contain name of the resource requested, for example: * `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, @@ -1126,7 +1126,7 @@ class DataTransferServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Name of transfer configuration for which transfer runs should be retrieved. + * Required. Name of transfer configuration for which transfer runs should be retrieved. * Format of transfer configuration resource name is: * `projects/{project_id}/transferConfigs/{config_id}`. * @param {number[]} [request.states] @@ -1248,7 +1248,7 @@ class DataTransferServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Name of transfer configuration for which transfer runs should be retrieved. + * Required. Name of transfer configuration for which transfer runs should be retrieved. * Format of transfer configuration resource name is: * `projects/{project_id}/transferConfigs/{config_id}`. * @param {number[]} [request.states] @@ -1303,7 +1303,7 @@ class DataTransferServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Transfer run name in the form: + * Required. Transfer run name in the form: * `projects/{project_id}/transferConfigs/{config_Id}/runs/{run_id}`. * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API @@ -1421,7 +1421,7 @@ class DataTransferServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Transfer run name in the form: + * Required. Transfer run name in the form: * `projects/{project_id}/transferConfigs/{config_Id}/runs/{run_id}`. * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API @@ -1477,7 +1477,7 @@ class DataTransferServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The data source in the form: + * Required. The data source in the form: * `projects/{project_id}/dataSources/{data_source_id}` * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, diff --git a/packages/google-cloud-bigquery-datatransfer/src/v1/doc/google/cloud/bigquery/datatransfer/v1/doc_datatransfer.js b/packages/google-cloud-bigquery-datatransfer/src/v1/doc/google/cloud/bigquery/datatransfer/v1/doc_datatransfer.js index 32718ad0b35..005110de99f 100644 --- a/packages/google-cloud-bigquery-datatransfer/src/v1/doc/google/cloud/bigquery/datatransfer/v1/doc_datatransfer.js +++ b/packages/google-cloud-bigquery-datatransfer/src/v1/doc/google/cloud/bigquery/datatransfer/v1/doc_datatransfer.js @@ -282,7 +282,7 @@ const DataSource = { * A request to get data source info. * * @property {string} name - * The field will contain name of the resource requested, for example: + * Required. The field will contain name of the resource requested, for example: * `projects/{project_id}/dataSources/{data_source_id}` * * @typedef GetDataSourceRequest @@ -297,7 +297,7 @@ const GetDataSourceRequest = { * Request to list supported data sources and their data transfer settings. * * @property {string} parent - * The BigQuery project id for which data sources should be returned. + * Required. The BigQuery project id for which data sources should be returned. * Must be in the form: `projects/{project_id}` * * @property {string} pageToken @@ -349,13 +349,13 @@ const ListDataSourcesResponse = { * with the calling user. * * @property {string} parent - * The BigQuery project id where the transfer configuration should be created. + * Required. The BigQuery project id where the transfer configuration should be created. * Must be in the format projects/{project_id}/locations/{location_id} * If specified location and location of the destination bigquery dataset * do not match - the request will fail. * * @property {Object} transferConfig - * Data transfer configuration to create. + * Required. Data transfer configuration to create. * * This object should have the same structure as [TransferConfig]{@link google.cloud.bigquery.datatransfer.v1.TransferConfig} * @@ -398,7 +398,7 @@ const CreateTransferConfigRequest = { * transfer configuration, an authorization code needs to be provided. * * @property {Object} transferConfig - * Data transfer configuration to create. + * Required. Data transfer configuration to create. * * This object should have the same structure as [TransferConfig]{@link google.cloud.bigquery.datatransfer.v1.TransferConfig} * @@ -421,7 +421,7 @@ const CreateTransferConfigRequest = { * the user to copy the code and paste it in the application. * * @property {Object} updateMask - * Required list of fields to be updated in this request. + * Required. Required list of fields to be updated in this request. * * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} * @@ -445,7 +445,7 @@ const UpdateTransferConfigRequest = { * A request to get data transfer information. * * @property {string} name - * The field will contain name of the resource requested, for example: + * Required. The field will contain name of the resource requested, for example: * `projects/{project_id}/transferConfigs/{config_id}` * * @typedef GetTransferConfigRequest @@ -461,7 +461,7 @@ const GetTransferConfigRequest = { * and log messages will be deleted as well. * * @property {string} name - * The field will contain name of the resource requested, for example: + * Required. The field will contain name of the resource requested, for example: * `projects/{project_id}/transferConfigs/{config_id}` * * @typedef DeleteTransferConfigRequest @@ -476,7 +476,7 @@ const DeleteTransferConfigRequest = { * A request to get data transfer run information. * * @property {string} name - * The field will contain name of the resource requested, for example: + * Required. The field will contain name of the resource requested, for example: * `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` * * @typedef GetTransferRunRequest @@ -491,7 +491,7 @@ const GetTransferRunRequest = { * A request to delete data transfer run information. * * @property {string} name - * The field will contain name of the resource requested, for example: + * Required. The field will contain name of the resource requested, for example: * `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` * * @typedef DeleteTransferRunRequest @@ -506,7 +506,7 @@ const DeleteTransferRunRequest = { * A request to list data transfers configured for a BigQuery project. * * @property {string} parent - * The BigQuery project id for which data sources + * Required. The BigQuery project id for which data sources * should be returned: `projects/{project_id}`. * * @property {string[]} dataSourceIds @@ -558,7 +558,7 @@ const ListTransferConfigsResponse = { * all scheduled transfer runs. * * @property {string} parent - * Name of transfer configuration for which transfer runs should be retrieved. + * Required. Name of transfer configuration for which transfer runs should be retrieved. * Format of transfer configuration resource name is: * `projects/{project_id}/transferConfigs/{config_id}`. * @@ -635,7 +635,7 @@ const ListTransferRunsResponse = { * A request to get user facing log messages associated with data transfer run. * * @property {string} parent - * Transfer run name in the form: + * Required. Transfer run name in the form: * `projects/{project_id}/transferConfigs/{config_Id}/runs/{run_id}`. * * @property {string} pageToken @@ -693,7 +693,7 @@ const ListTransferLogsResponse = { * already valid merely based on the user id. * * @property {string} name - * The data source in the form: + * Required. The data source in the form: * `projects/{project_id}/dataSources/{data_source_id}` * * @typedef CheckValidCredsRequest @@ -722,17 +722,17 @@ const CheckValidCredsResponse = { * A request to schedule transfer runs for a time range. * * @property {string} parent - * Transfer configuration name in the form: + * Required. Transfer configuration name in the form: * `projects/{project_id}/transferConfigs/{config_id}`. * * @property {Object} startTime - * Start time of the range of transfer runs. For example, + * Required. Start time of the range of transfer runs. For example, * `"2017-05-25T00:00:00+00:00"`. * * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} * * @property {Object} endTime - * End time of the range of transfer runs. For example, + * Required. End time of the range of transfer runs. For example, * `"2017-05-30T00:00:00+00:00"`. * * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} diff --git a/packages/google-cloud-bigquery-datatransfer/synth.metadata b/packages/google-cloud-bigquery-datatransfer/synth.metadata index 9d03065e433..cb69e8f7d9b 100644 --- a/packages/google-cloud-bigquery-datatransfer/synth.metadata +++ b/packages/google-cloud-bigquery-datatransfer/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-08-31T11:08:27.312892Z", + "updateTime": "2019-09-27T11:09:25.035328Z", "sources": [ { "generator": { "name": "artman", - "version": "0.36.1", - "dockerImage": "googleapis/artman@sha256:7c20f006c7a62d9d782e2665647d52290c37a952ef3cd134624d5dd62b3f71bd" + "version": "0.37.1", + "dockerImage": "googleapis/artman@sha256:6068f67900a3f0bdece596b97bda8fc70406ca0e137a941f4c81d3217c994a80" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "82809578652607c8ee29d9e199c21f28f81a03e0", - "internalRef": "266247326" + "sha": "cd112d8d255e0099df053643d4bd12c228ef7b1b", + "internalRef": "271468707" } }, {