Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Commit

Permalink
Regenerate the library with microgenerator
Browse files Browse the repository at this point in the history
  • Loading branch information
plamut committed Sep 17, 2020
1 parent 9efb155 commit fe7a903
Show file tree
Hide file tree
Showing 29 changed files with 12,540 additions and 102 deletions.
43 changes: 43 additions & 0 deletions .kokoro/populate-secrets.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash
# Copyright 2020 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -eo pipefail

function now { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n' ;}
function msg { println "$*" >&2 ;}
function println { printf '%s\n' "$(now) $*" ;}


# Populates requested secrets set in SECRET_MANAGER_KEYS from service account:
# kokoro-trampoline@cloud-devrel-kokoro-resources.iam.gserviceaccount.com
SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager"
msg "Creating folder on disk for secrets: ${SECRET_LOCATION}"
mkdir -p ${SECRET_LOCATION}
for key in $(echo ${SECRET_MANAGER_KEYS} | sed "s/,/ /g")
do
msg "Retrieving secret ${key}"
docker run --entrypoint=gcloud \
--volume=${KOKORO_GFILE_DIR}:${KOKORO_GFILE_DIR} \
gcr.io/google.com/cloudsdktool/cloud-sdk \
secrets versions access latest \
--project cloud-devrel-kokoro-resources \
--secret ${key} > \
"${SECRET_LOCATION}/${key}"
if [[ $? == 0 ]]; then
msg "Secret written to ${SECRET_LOCATION}/${key}"
else
msg "Error retrieving secret ${key}"
fi
done
50 changes: 13 additions & 37 deletions .kokoro/release/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,42 +23,18 @@ env_vars: {
value: "github/python-bigquery-datatransfer/.kokoro/release.sh"
}

# Fetch the token needed for reporting release status to GitHub
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "yoshi-automation-github-key"
}
}
}

# Fetch PyPI password
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "google_cloud_pypi_password"
}
}
}

# Fetch magictoken to use with Magic Github Proxy
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "releasetool-magictoken"
}
}
# Fetch PyPI password
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "google_cloud_pypi_password"
}
}
}

# Fetch api key to use with Magic Github Proxy
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "magic-github-proxy-api-key"
}
}
}
# Tokens needed to report release status back to GitHub
env_vars: {
key: "SECRET_MANAGER_KEYS"
value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem"
}
15 changes: 10 additions & 5 deletions .kokoro/trampoline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,14 @@

set -eo pipefail

python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py" || ret_code=$?
# Always run the cleanup script, regardless of the success of bouncing into
# the container.
function cleanup() {
chmod +x ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh
${KOKORO_GFILE_DIR}/trampoline_cleanup.sh
echo "cleanup";
}
trap cleanup EXIT

chmod +x ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh
${KOKORO_GFILE_DIR}/trampoline_cleanup.sh || true

exit ${ret_code}
$(dirname $0)/populate-secrets.sh # Secret Manager secrets.
python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py"
130 changes: 130 additions & 0 deletions google/cloud/bigquery/datatransfer/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# -*- coding: utf-8 -*-

# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

from google.cloud.bigquery.datatransfer_v1.services.data_transfer_service.async_client import (
DataTransferServiceAsyncClient,
)
from google.cloud.bigquery.datatransfer_v1.services.data_transfer_service.client import (
DataTransferServiceClient,
)
from google.cloud.bigquery.datatransfer_v1.types.datatransfer import (
CheckValidCredsRequest,
)
from google.cloud.bigquery.datatransfer_v1.types.datatransfer import (
CheckValidCredsResponse,
)
from google.cloud.bigquery.datatransfer_v1.types.datatransfer import (
CreateTransferConfigRequest,
)
from google.cloud.bigquery.datatransfer_v1.types.datatransfer import DataSource
from google.cloud.bigquery.datatransfer_v1.types.datatransfer import DataSourceParameter
from google.cloud.bigquery.datatransfer_v1.types.datatransfer import (
DeleteTransferConfigRequest,
)
from google.cloud.bigquery.datatransfer_v1.types.datatransfer import (
DeleteTransferRunRequest,
)
from google.cloud.bigquery.datatransfer_v1.types.datatransfer import (
GetDataSourceRequest,
)
from google.cloud.bigquery.datatransfer_v1.types.datatransfer import (
GetTransferConfigRequest,
)
from google.cloud.bigquery.datatransfer_v1.types.datatransfer import (
GetTransferRunRequest,
)
from google.cloud.bigquery.datatransfer_v1.types.datatransfer import (
ListDataSourcesRequest,
)
from google.cloud.bigquery.datatransfer_v1.types.datatransfer import (
ListDataSourcesResponse,
)
from google.cloud.bigquery.datatransfer_v1.types.datatransfer import (
ListTransferConfigsRequest,
)
from google.cloud.bigquery.datatransfer_v1.types.datatransfer import (
ListTransferConfigsResponse,
)
from google.cloud.bigquery.datatransfer_v1.types.datatransfer import (
ListTransferLogsRequest,
)
from google.cloud.bigquery.datatransfer_v1.types.datatransfer import (
ListTransferLogsResponse,
)
from google.cloud.bigquery.datatransfer_v1.types.datatransfer import (
ListTransferRunsRequest,
)
from google.cloud.bigquery.datatransfer_v1.types.datatransfer import (
ListTransferRunsResponse,
)
from google.cloud.bigquery.datatransfer_v1.types.datatransfer import (
ScheduleTransferRunsRequest,
)
from google.cloud.bigquery.datatransfer_v1.types.datatransfer import (
ScheduleTransferRunsResponse,
)
from google.cloud.bigquery.datatransfer_v1.types.datatransfer import (
StartManualTransferRunsRequest,
)
from google.cloud.bigquery.datatransfer_v1.types.datatransfer import (
StartManualTransferRunsResponse,
)
from google.cloud.bigquery.datatransfer_v1.types.datatransfer import (
UpdateTransferConfigRequest,
)
from google.cloud.bigquery.datatransfer_v1.types.transfer import EmailPreferences
from google.cloud.bigquery.datatransfer_v1.types.transfer import ScheduleOptions
from google.cloud.bigquery.datatransfer_v1.types.transfer import TransferConfig
from google.cloud.bigquery.datatransfer_v1.types.transfer import TransferMessage
from google.cloud.bigquery.datatransfer_v1.types.transfer import TransferRun
from google.cloud.bigquery.datatransfer_v1.types.transfer import TransferState
from google.cloud.bigquery.datatransfer_v1.types.transfer import TransferType

__all__ = (
"CheckValidCredsRequest",
"CheckValidCredsResponse",
"CreateTransferConfigRequest",
"DataSource",
"DataSourceParameter",
"DataTransferServiceAsyncClient",
"DataTransferServiceClient",
"DeleteTransferConfigRequest",
"DeleteTransferRunRequest",
"EmailPreferences",
"GetDataSourceRequest",
"GetTransferConfigRequest",
"GetTransferRunRequest",
"ListDataSourcesRequest",
"ListDataSourcesResponse",
"ListTransferConfigsRequest",
"ListTransferConfigsResponse",
"ListTransferLogsRequest",
"ListTransferLogsResponse",
"ListTransferRunsRequest",
"ListTransferRunsResponse",
"ScheduleOptions",
"ScheduleTransferRunsRequest",
"ScheduleTransferRunsResponse",
"StartManualTransferRunsRequest",
"StartManualTransferRunsResponse",
"TransferConfig",
"TransferMessage",
"TransferRun",
"TransferState",
"TransferType",
"UpdateTransferConfigRequest",
)
2 changes: 2 additions & 0 deletions google/cloud/bigquery/datatransfer/py.typed
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Marker file for PEP 561.
# The google-cloud-bigquery-datatransfer package uses inline types.
83 changes: 83 additions & 0 deletions google/cloud/bigquery/datatransfer_v1/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# -*- coding: utf-8 -*-

# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

from .services.data_transfer_service import DataTransferServiceClient
from .types.datatransfer import CheckValidCredsRequest
from .types.datatransfer import CheckValidCredsResponse
from .types.datatransfer import CreateTransferConfigRequest
from .types.datatransfer import DataSource
from .types.datatransfer import DataSourceParameter
from .types.datatransfer import DeleteTransferConfigRequest
from .types.datatransfer import DeleteTransferRunRequest
from .types.datatransfer import GetDataSourceRequest
from .types.datatransfer import GetTransferConfigRequest
from .types.datatransfer import GetTransferRunRequest
from .types.datatransfer import ListDataSourcesRequest
from .types.datatransfer import ListDataSourcesResponse
from .types.datatransfer import ListTransferConfigsRequest
from .types.datatransfer import ListTransferConfigsResponse
from .types.datatransfer import ListTransferLogsRequest
from .types.datatransfer import ListTransferLogsResponse
from .types.datatransfer import ListTransferRunsRequest
from .types.datatransfer import ListTransferRunsResponse
from .types.datatransfer import ScheduleTransferRunsRequest
from .types.datatransfer import ScheduleTransferRunsResponse
from .types.datatransfer import StartManualTransferRunsRequest
from .types.datatransfer import StartManualTransferRunsResponse
from .types.datatransfer import UpdateTransferConfigRequest
from .types.transfer import EmailPreferences
from .types.transfer import ScheduleOptions
from .types.transfer import TransferConfig
from .types.transfer import TransferMessage
from .types.transfer import TransferRun
from .types.transfer import TransferState
from .types.transfer import TransferType


__all__ = (
"CheckValidCredsRequest",
"CheckValidCredsResponse",
"CreateTransferConfigRequest",
"DataSource",
"DataSourceParameter",
"DeleteTransferConfigRequest",
"DeleteTransferRunRequest",
"EmailPreferences",
"GetDataSourceRequest",
"GetTransferConfigRequest",
"GetTransferRunRequest",
"ListDataSourcesRequest",
"ListDataSourcesResponse",
"ListTransferConfigsRequest",
"ListTransferConfigsResponse",
"ListTransferLogsRequest",
"ListTransferLogsResponse",
"ListTransferRunsRequest",
"ListTransferRunsResponse",
"ScheduleOptions",
"ScheduleTransferRunsRequest",
"ScheduleTransferRunsResponse",
"StartManualTransferRunsRequest",
"StartManualTransferRunsResponse",
"TransferConfig",
"TransferMessage",
"TransferRun",
"TransferState",
"TransferType",
"UpdateTransferConfigRequest",
"DataTransferServiceClient",
)
2 changes: 2 additions & 0 deletions google/cloud/bigquery/datatransfer_v1/py.typed
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Marker file for PEP 561.
# The google-cloud-bigquery-datatransfer package uses inline types.
16 changes: 16 additions & 0 deletions google/cloud/bigquery/datatransfer_v1/services/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-

# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-

# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

from .client import DataTransferServiceClient
from .async_client import DataTransferServiceAsyncClient

__all__ = (
"DataTransferServiceClient",
"DataTransferServiceAsyncClient",
)

0 comments on commit fe7a903

Please sign in to comment.