Skip to content

Commit

Permalink
update gax and synth.py (#43)
Browse files Browse the repository at this point in the history
* update gax and synth.py

* changes to synth.py

* update package locks

* package lock updates
  • Loading branch information
crwilcox authored and JustinBeckwith committed Jun 26, 2018
1 parent 9a27ff6 commit 2fc8cfa
Show file tree
Hide file tree
Showing 11 changed files with 1,348 additions and 2,571 deletions.
3,286 changes: 1,107 additions & 2,179 deletions packages/google-cloud-bigquery-datatransfer/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/google-cloud-bigquery-datatransfer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"system-test": "mocha system-test/*.js smoke-test/*.js --timeout 600000"
},
"dependencies": {
"google-gax": "^0.16.1",
"google-gax": "^0.17.1",
"lodash.merge": "^4.6.1"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ option java_outer_classname = "DataTransferProto";
option java_package = "com.google.cloud.bigquery.datatransfer.v1";
option php_namespace = "Google\\Cloud\\BigQuery\\DataTransfer\\V1";


// The Google BigQuery Data Transfer Service API enables BigQuery users to
// configure the transfer of their data from other Google Products into BigQuery.
// This service contains methods that are end user exposed. It backs up the
Expand All @@ -41,103 +42,131 @@ service DataTransferService {
rpc GetDataSource(GetDataSourceRequest) returns (DataSource) {
option (google.api.http) = {
get: "/v1/{name=projects/*/locations/*/dataSources/*}"
additional_bindings {
get: "/v1/{name=projects/*/dataSources/*}"
}
};
}

// Lists supported data sources and returns their settings,
// which can be used for UI rendering.
rpc ListDataSources(ListDataSourcesRequest)
returns (ListDataSourcesResponse) {
rpc ListDataSources(ListDataSourcesRequest) returns (ListDataSourcesResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*}/dataSources"
additional_bindings {
get: "/v1/{parent=projects/*}/dataSources"
}
};
}

// Creates a new data transfer configuration.
rpc CreateTransferConfig(CreateTransferConfigRequest)
returns (TransferConfig) {
rpc CreateTransferConfig(CreateTransferConfigRequest) returns (TransferConfig) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/locations/*}/transferConfigs"
body: "transfer_config"
additional_bindings {
post: "/v1/{parent=projects/*}/transferConfigs"
body: "transfer_config"
}
};
}

// Updates a data transfer configuration.
// All fields must be set, even if they are not updated.
rpc UpdateTransferConfig(UpdateTransferConfigRequest)
returns (TransferConfig) {
rpc UpdateTransferConfig(UpdateTransferConfigRequest) returns (TransferConfig) {
option (google.api.http) = {
patch:
"/v1/{transfer_config.name=projects/*/locations/*/transferConfigs/*}"
patch: "/v1/{transfer_config.name=projects/*/locations/*/transferConfigs/*}"
body: "transfer_config"
additional_bindings {
patch: "/v1/{transfer_config.name=projects/*/transferConfigs/*}"
body: "transfer_config"
}
};
}

// Deletes a data transfer configuration,
// including any associated transfer runs and logs.
rpc DeleteTransferConfig(DeleteTransferConfigRequest)
returns (google.protobuf.Empty) {
rpc DeleteTransferConfig(DeleteTransferConfigRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1/{name=projects/*/locations/*/transferConfigs/*}"
additional_bindings {
delete: "/v1/{name=projects/*/transferConfigs/*}"
}
};
}

// Returns information about a data transfer config.
rpc GetTransferConfig(GetTransferConfigRequest) returns (TransferConfig) {
option (google.api.http) = {
get: "/v1/{name=projects/*/locations/*/transferConfigs/*}"
additional_bindings {
get: "/v1/{name=projects/*/transferConfigs/*}"
}
};
}

// Returns information about all data transfers in the project.
rpc ListTransferConfigs(ListTransferConfigsRequest)
returns (ListTransferConfigsResponse) {
rpc ListTransferConfigs(ListTransferConfigsRequest) returns (ListTransferConfigsResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*}/transferConfigs"
additional_bindings {
get: "/v1/{parent=projects/*}/transferConfigs"
}
};
}

// Creates transfer runs for a time range [start_time, end_time].
// For each date - or whatever granularity the data source supports - in the
// range, one transfer run is created.
// Note that runs are created per UTC time in the time range.
rpc ScheduleTransferRuns(ScheduleTransferRunsRequest)
returns (ScheduleTransferRunsResponse) {
rpc ScheduleTransferRuns(ScheduleTransferRunsRequest) returns (ScheduleTransferRunsResponse) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/locations/*/transferConfigs/*}:scheduleRuns"
body: "*"
additional_bindings {
post: "/v1/{parent=projects/*/transferConfigs/*}:scheduleRuns"
body: "*"
}
};
}

// Returns information about the particular transfer run.
rpc GetTransferRun(GetTransferRunRequest) returns (TransferRun) {
option (google.api.http) = {
get: "/v1/{name=projects/*/locations/*/transferConfigs/*/runs/*}"
additional_bindings {
get: "/v1/{name=projects/*/transferConfigs/*/runs/*}"
}
};
}

// Deletes the specified transfer run.
rpc DeleteTransferRun(DeleteTransferRunRequest)
returns (google.protobuf.Empty) {
rpc DeleteTransferRun(DeleteTransferRunRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1/{name=projects/*/locations/*/transferConfigs/*/runs/*}"
additional_bindings {
delete: "/v1/{name=projects/*/transferConfigs/*/runs/*}"
}
};
}

// Returns information about running and completed jobs.
rpc ListTransferRuns(ListTransferRunsRequest)
returns (ListTransferRunsResponse) {
rpc ListTransferRuns(ListTransferRunsRequest) returns (ListTransferRunsResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*/transferConfigs/*}/runs"
additional_bindings {
get: "/v1/{parent=projects/*/transferConfigs/*}/runs"
}
};
}

// Returns user facing log messages for the data transfer run.
rpc ListTransferLogs(ListTransferLogsRequest)
returns (ListTransferLogsResponse) {
rpc ListTransferLogs(ListTransferLogsRequest) returns (ListTransferLogsResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*/transferConfigs/*/runs/*}/"
"transferLogs"
get: "/v1/{parent=projects/*/locations/*/transferConfigs/*/runs/*}/transferLogs"
additional_bindings {
get: "/v1/{parent=projects/*/transferConfigs/*/runs/*}/transferLogs"
}
};
}

Expand All @@ -147,11 +176,14 @@ service DataTransferService {
// them on behalf of the end user. This API just checks whether we have OAuth
// token for the particular user, which is a pre-requisite before user can
// create a transfer config.
rpc CheckValidCreds(CheckValidCredsRequest)
returns (CheckValidCredsResponse) {
rpc CheckValidCreds(CheckValidCredsRequest) returns (CheckValidCredsResponse) {
option (google.api.http) = {
post: "/v1/{name=projects/*/locations/*/dataSources/*}:checkValidCreds"
body: "*"
additional_bindings {
post: "/v1/{name=projects/*/dataSources/*}:checkValidCreds"
body: "*"
}
};
}
}
Expand Down Expand Up @@ -269,7 +301,7 @@ message DataSource {
CUSTOM_SLIDING_WINDOW = 2;
}

// Data source resource name.
// Output only. Data source resource name.
string name = 1;

// Data source id.
Expand All @@ -291,9 +323,7 @@ message DataSource {
// e.g., https://www.googleapis.com/auth/bigquery
repeated string scopes = 6;

// Transfer type. Currently supports only batch transfers,
// which are transfers that use the BigQuery batch APIs (load or
// query) to ingest the data.
// Deprecated. This field has no effect.
TransferType transfer_type = 7;

// Indicates whether the data source supports multiple transfers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ option java_package = "com.google.cloud.bigquery.datatransfer.v1";
option objc_class_prefix = "GCBDT";
option php_namespace = "Google\\Cloud\\BigQuery\\DataTransfer\\V1";


// Represents a data transfer configuration. A transfer configuration
// contains all metadata needed to perform a data transfer. For example,
// `destination_dataset_id` specifies where data should be stored.
// When a new transfer configuration is created, the specified
// `destination_dataset_id` is created when needed and shared with the
// appropriate data source service account.
// Next id: 20
message TransferConfig {
// The resource name of the transfer config.
// Transfer config names have the form
Expand Down Expand Up @@ -104,7 +104,6 @@ message TransferConfig {
}

// Represents a data transfer run.
// Next id: 27
message TransferRun {
// The resource name of the transfer run.
// Transfer run names have the form
Expand Down Expand Up @@ -187,7 +186,7 @@ message TransferMessage {
string message_text = 3;
}

// Represents data transfer type.
// DEPRECATED. Represents data transfer type.
enum TransferType {
// Invalid or Unknown transfer type placeholder.
TRANSFER_TYPE_UNSPECIFIED = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('DataTransferServiceSmokeTest', () => {
});

// Iterate over all elements.
var formattedParent = client.locationPath(projectId, 'us-central1');
var formattedParent = client.projectPath(projectId);

client
.listDataSources({parent: formattedParent})
Expand All @@ -50,7 +50,7 @@ describe('DataTransferServiceSmokeTest', () => {
});

// Or obtain the paged response.
var formattedParent = client.locationPath(projectId, 'us-central1');
var formattedParent = client.projectPath(projectId);

var options = {autoPaginate: false};
var callback = responses => {
Expand Down Expand Up @@ -82,7 +82,7 @@ describe('DataTransferServiceSmokeTest', () => {
// optional auth parameters.
});

var formattedParent = client.locationPath(projectId, 'us-central1');
var formattedParent = client.projectPath(projectId);
client
.listDataSourcesStream({parent: formattedParent})
.on('data', element => {
Expand Down
Loading

0 comments on commit 2fc8cfa

Please sign in to comment.