Skip to content

Commit

Permalink
feat: new features for Places GA
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 575913105

Source-Link: googleapis/googleapis@0d6992f

Source-Link: googleapis/googleapis-gen@7cdc9e8
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuTWFwcy5QbGFjZXMuVjEvLk93bEJvdC55YW1sIiwiaCI6IjdjZGM5ZThjMGJkOGU2MzViYzBhYTljOTUzZTkzYzk1ZGM5ZGY4NzIifQ==
  • Loading branch information
gcf-owl-bot[bot] committed Oct 23, 2023
1 parent 68fd97c commit f6cc819
Show file tree
Hide file tree
Showing 32 changed files with 11,931 additions and 3,263 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Copyright 2023 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
//
// https://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!

namespace GoogleCSharpSnippets
{
// [START places_v1_generated_Places_GetPhotoMedia_async_flattened]
using Google.Maps.Places.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedPlacesClientSnippets
{
/// <summary>Snippet for GetPhotoMediaAsync</summary>
/// <remarks>
/// 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://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public async Task GetPhotoMediaAsync()
{
// Create client
PlacesClient placesClient = await PlacesClient.CreateAsync();
// Initialize request argument(s)
string name = "places/[PLACE_ID]/photos/[PHOTO_REFERENCE]/media";
// Make the request
PhotoMedia response = await placesClient.GetPhotoMediaAsync(name);
}
}
// [END places_v1_generated_Places_GetPhotoMedia_async_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// Copyright 2023 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
//
// https://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!

namespace GoogleCSharpSnippets
{
// [START places_v1_generated_Places_GetPhotoMedia_async]
using Google.Maps.Places.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedPlacesClientSnippets
{
/// <summary>Snippet for GetPhotoMediaAsync</summary>
/// <remarks>
/// 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://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public async Task GetPhotoMediaRequestObjectAsync()
{
// Create client
PlacesClient placesClient = await PlacesClient.CreateAsync();
// Initialize request argument(s)
GetPhotoMediaRequest request = new GetPhotoMediaRequest
{
PhotoMediaName = PhotoMediaName.FromPlacePhotoReference("[PLACE_ID]", "[PHOTO_REFERENCE]"),
MaxWidthPx = 0,
MaxHeightPx = 0,
SkipHttpRedirect = false,
};
// Make the request
PhotoMedia response = await placesClient.GetPhotoMediaAsync(request);
}
}
// [END places_v1_generated_Places_GetPhotoMedia_async]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// Copyright 2023 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
//
// https://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!

namespace GoogleCSharpSnippets
{
// [START places_v1_generated_Places_GetPhotoMedia_sync]
using Google.Maps.Places.V1;

public sealed partial class GeneratedPlacesClientSnippets
{
/// <summary>Snippet for GetPhotoMedia</summary>
/// <remarks>
/// 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://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public void GetPhotoMediaRequestObject()
{
// Create client
PlacesClient placesClient = PlacesClient.Create();
// Initialize request argument(s)
GetPhotoMediaRequest request = new GetPhotoMediaRequest
{
PhotoMediaName = PhotoMediaName.FromPlacePhotoReference("[PLACE_ID]", "[PHOTO_REFERENCE]"),
MaxWidthPx = 0,
MaxHeightPx = 0,
SkipHttpRedirect = false,
};
// Make the request
PhotoMedia response = placesClient.GetPhotoMedia(request);
}
}
// [END places_v1_generated_Places_GetPhotoMedia_sync]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Copyright 2023 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
//
// https://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!

namespace GoogleCSharpSnippets
{
// [START places_v1_generated_Places_GetPhotoMedia_async_flattened_resourceNames]
using Google.Maps.Places.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedPlacesClientSnippets
{
/// <summary>Snippet for GetPhotoMediaAsync</summary>
/// <remarks>
/// 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://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public async Task GetPhotoMediaResourceNamesAsync()
{
// Create client
PlacesClient placesClient = await PlacesClient.CreateAsync();
// Initialize request argument(s)
PhotoMediaName name = PhotoMediaName.FromPlacePhotoReference("[PLACE_ID]", "[PHOTO_REFERENCE]");
// Make the request
PhotoMedia response = await placesClient.GetPhotoMediaAsync(name);
}
}
// [END places_v1_generated_Places_GetPhotoMedia_async_flattened_resourceNames]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Copyright 2023 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
//
// https://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!

namespace GoogleCSharpSnippets
{
// [START places_v1_generated_Places_GetPhotoMedia_sync_flattened_resourceNames]
using Google.Maps.Places.V1;

public sealed partial class GeneratedPlacesClientSnippets
{
/// <summary>Snippet for GetPhotoMedia</summary>
/// <remarks>
/// 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://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public void GetPhotoMediaResourceNames()
{
// Create client
PlacesClient placesClient = PlacesClient.Create();
// Initialize request argument(s)
PhotoMediaName name = PhotoMediaName.FromPlacePhotoReference("[PLACE_ID]", "[PHOTO_REFERENCE]");
// Make the request
PhotoMedia response = placesClient.GetPhotoMedia(name);
}
}
// [END places_v1_generated_Places_GetPhotoMedia_sync_flattened_resourceNames]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Copyright 2023 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
//
// https://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!

namespace GoogleCSharpSnippets
{
// [START places_v1_generated_Places_GetPhotoMedia_sync_flattened]
using Google.Maps.Places.V1;

public sealed partial class GeneratedPlacesClientSnippets
{
/// <summary>Snippet for GetPhotoMedia</summary>
/// <remarks>
/// 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://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public void GetPhotoMedia()
{
// Create client
PlacesClient placesClient = PlacesClient.Create();
// Initialize request argument(s)
string name = "places/[PLACE_ID]/photos/[PHOTO_REFERENCE]/media";
// Make the request
PhotoMedia response = placesClient.GetPhotoMedia(name);
}
}
// [END places_v1_generated_Places_GetPhotoMedia_sync_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Copyright 2023 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
//
// https://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!

namespace GoogleCSharpSnippets
{
// [START places_v1_generated_Places_GetPlace_async_flattened]
using Google.Maps.Places.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedPlacesClientSnippets
{
/// <summary>Snippet for GetPlaceAsync</summary>
/// <remarks>
/// 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://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public async Task GetPlaceAsync()
{
// Create client
PlacesClient placesClient = await PlacesClient.CreateAsync();
// Initialize request argument(s)
string name = "places/[PLACE_ID]";
// Make the request
Place response = await placesClient.GetPlaceAsync(name);
}
}
// [END places_v1_generated_Places_GetPlace_async_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// Copyright 2023 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
//
// https://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!

namespace GoogleCSharpSnippets
{
// [START places_v1_generated_Places_GetPlace_async]
using Google.Maps.Places.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedPlacesClientSnippets
{
/// <summary>Snippet for GetPlaceAsync</summary>
/// <remarks>
/// 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://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public async Task GetPlaceRequestObjectAsync()
{
// Create client
PlacesClient placesClient = await PlacesClient.CreateAsync();
// Initialize request argument(s)
GetPlaceRequest request = new GetPlaceRequest
{
PlaceName = PlaceName.FromPlace("[PLACE_ID]"),
LanguageCode = "",
RegionCode = "",
};
// Make the request
Place response = await placesClient.GetPlaceAsync(request);
}
}
// [END places_v1_generated_Places_GetPlace_async]
}

0 comments on commit f6cc819

Please sign in to comment.