Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.5.3" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.5.3" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -2040,7 +2040,7 @@ async def list_locations(
# Done; return the response.
return response

async def __aenter__(self):
async def __aenter__(self) -> "AnalyticsHubServiceAsyncClient":
return self

async def __aexit__(self, exc_type, exc, tb):
Expand Down
3 changes: 1 addition & 2 deletions packages/google-cloud-bigquery-data-exchange/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,9 @@ def docfx(session):

session.install("-e", ".")
session.install(
"sphinx==4.0.1",
"gcp-sphinx-docfx-yaml",
"alabaster",
"recommonmark",
"gcp-sphinx-docfx-yaml",
)

shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# -*- coding: utf-8 -*-
# Copyright 2022 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.
#
# Generated code. DO NOT EDIT!
#
# Snippet for CreateDataExchange
# NOTE: This snippet has been automatically generated for illustrative purposes only.
# It may require modifications to work in your environment.

# To install the latest published package dependency, execute the following:
# python3 -m pip install google-cloud-bigquery-data-exchange


# [START analyticshub_v1beta1_generated_AnalyticsHubService_CreateDataExchange_async]
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bigquery_data_exchange_v1beta1


async def sample_create_data_exchange():
# Create a client
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceAsyncClient()

# Initialize request argument(s)
data_exchange = bigquery_data_exchange_v1beta1.DataExchange()
data_exchange.display_name = "display_name_value"

request = bigquery_data_exchange_v1beta1.CreateDataExchangeRequest(
parent="parent_value",
data_exchange_id="data_exchange_id_value",
data_exchange=data_exchange,
)

# Make the request
response = await client.create_data_exchange(request=request)

# Handle the response
print(response)

# [END analyticshub_v1beta1_generated_AnalyticsHubService_CreateDataExchange_async]
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# -*- coding: utf-8 -*-
# Copyright 2022 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.
#
# Generated code. DO NOT EDIT!
#
# Snippet for CreateDataExchange
# NOTE: This snippet has been automatically generated for illustrative purposes only.
# It may require modifications to work in your environment.

# To install the latest published package dependency, execute the following:
# python3 -m pip install google-cloud-bigquery-data-exchange


# [START analyticshub_v1beta1_generated_AnalyticsHubService_CreateDataExchange_sync]
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bigquery_data_exchange_v1beta1


def sample_create_data_exchange():
# Create a client
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceClient()

# Initialize request argument(s)
data_exchange = bigquery_data_exchange_v1beta1.DataExchange()
data_exchange.display_name = "display_name_value"

request = bigquery_data_exchange_v1beta1.CreateDataExchangeRequest(
parent="parent_value",
data_exchange_id="data_exchange_id_value",
data_exchange=data_exchange,
)

# Make the request
response = client.create_data_exchange(request=request)

# Handle the response
print(response)

# [END analyticshub_v1beta1_generated_AnalyticsHubService_CreateDataExchange_sync]
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# -*- coding: utf-8 -*-
# Copyright 2022 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.
#
# Generated code. DO NOT EDIT!
#
# Snippet for CreateListing
# NOTE: This snippet has been automatically generated for illustrative purposes only.
# It may require modifications to work in your environment.

# To install the latest published package dependency, execute the following:
# python3 -m pip install google-cloud-bigquery-data-exchange


# [START analyticshub_v1beta1_generated_AnalyticsHubService_CreateListing_async]
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bigquery_data_exchange_v1beta1


async def sample_create_listing():
# Create a client
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceAsyncClient()

# Initialize request argument(s)
listing = bigquery_data_exchange_v1beta1.Listing()
listing.display_name = "display_name_value"

request = bigquery_data_exchange_v1beta1.CreateListingRequest(
parent="parent_value",
listing_id="listing_id_value",
listing=listing,
)

# Make the request
response = await client.create_listing(request=request)

# Handle the response
print(response)

# [END analyticshub_v1beta1_generated_AnalyticsHubService_CreateListing_async]
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# -*- coding: utf-8 -*-
# Copyright 2022 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.
#
# Generated code. DO NOT EDIT!
#
# Snippet for CreateListing
# NOTE: This snippet has been automatically generated for illustrative purposes only.
# It may require modifications to work in your environment.

# To install the latest published package dependency, execute the following:
# python3 -m pip install google-cloud-bigquery-data-exchange


# [START analyticshub_v1beta1_generated_AnalyticsHubService_CreateListing_sync]
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bigquery_data_exchange_v1beta1


def sample_create_listing():
# Create a client
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceClient()

# Initialize request argument(s)
listing = bigquery_data_exchange_v1beta1.Listing()
listing.display_name = "display_name_value"

request = bigquery_data_exchange_v1beta1.CreateListingRequest(
parent="parent_value",
listing_id="listing_id_value",
listing=listing,
)

# Make the request
response = client.create_listing(request=request)

# Handle the response
print(response)

# [END analyticshub_v1beta1_generated_AnalyticsHubService_CreateListing_sync]
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# -*- coding: utf-8 -*-
# Copyright 2022 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.
#
# Generated code. DO NOT EDIT!
#
# Snippet for DeleteDataExchange
# NOTE: This snippet has been automatically generated for illustrative purposes only.
# It may require modifications to work in your environment.

# To install the latest published package dependency, execute the following:
# python3 -m pip install google-cloud-bigquery-data-exchange


# [START analyticshub_v1beta1_generated_AnalyticsHubService_DeleteDataExchange_async]
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bigquery_data_exchange_v1beta1


async def sample_delete_data_exchange():
# Create a client
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceAsyncClient()

# Initialize request argument(s)
request = bigquery_data_exchange_v1beta1.DeleteDataExchangeRequest(
name="name_value",
)

# Make the request
await client.delete_data_exchange(request=request)


# [END analyticshub_v1beta1_generated_AnalyticsHubService_DeleteDataExchange_async]
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# -*- coding: utf-8 -*-
# Copyright 2022 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.
#
# Generated code. DO NOT EDIT!
#
# Snippet for DeleteDataExchange
# NOTE: This snippet has been automatically generated for illustrative purposes only.
# It may require modifications to work in your environment.

# To install the latest published package dependency, execute the following:
# python3 -m pip install google-cloud-bigquery-data-exchange


# [START analyticshub_v1beta1_generated_AnalyticsHubService_DeleteDataExchange_sync]
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bigquery_data_exchange_v1beta1


def sample_delete_data_exchange():
# Create a client
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceClient()

# Initialize request argument(s)
request = bigquery_data_exchange_v1beta1.DeleteDataExchangeRequest(
name="name_value",
)

# Make the request
client.delete_data_exchange(request=request)


# [END analyticshub_v1beta1_generated_AnalyticsHubService_DeleteDataExchange_sync]
Loading