### Get Photo Media with Name (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.PlacesClient Illustrates how to fetch photo media by providing the photo media name as a PhotoMediaName object. The example demonstrates creating the client, constructing the PhotoMediaName, and invoking the GetPhotoMedia method. ```csharp // 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); ``` -------------------------------- ### Get Photo Media with Request (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.PlacesClient Provides a C# code example for retrieving photo media using a GetPhotoMediaRequest object. This includes creating a PlacesClient, initializing the request with parameters like photo media name and max dimensions, and making the call. ```csharp // 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); ``` -------------------------------- ### Instantiate PlacesClientBuilder Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.PlacesClientBuilder Creates a new instance of the PlacesClientBuilder with default settings. This is the starting point for configuring and building a PlacesClient. ```csharp PlacesClientBuilder builder = new PlacesClientBuilder(); ``` -------------------------------- ### Autocomplete Places Async Request Example (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.PlacesClient This C# code snippet demonstrates how to asynchronously retrieve predictions using the AutocompletePlacesAsync method of the PlacesClient. It covers client creation and request initialization, similar to the synchronous example, but utilizes await for non-blocking execution. This is suitable for applications requiring responsiveness during API calls. ```csharp // Create client PlacesClient placesClient = await PlacesClient.CreateAsync(); // Initialize request argument(s) AutocompletePlacesRequest request = new AutocompletePlacesRequest { Input = "", LocationBias = new AutocompletePlacesRequest.Types.LocationBias(), LocationRestriction = new AutocompletePlacesRequest.Types.LocationRestriction(), IncludedPrimaryTypes = { "", }, IncludedRegionCodes = { "", }, LanguageCode = "", RegionCode = "", Origin = new LatLng(), InputOffset = 0, IncludeQueryPredictions = false, SessionToken = "", IncludePureServiceAreaBusinesses = false, }; // Make the request AutocompletePlacesResponse response = await placesClient.AutocompletePlacesAsync(request); ``` -------------------------------- ### Initialize SearchTextRequest in C# Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.SearchTextRequest Demonstrates the initialization of a SearchTextRequest object using its default constructor. This is the starting point for building a text search request. ```csharp using Google.Maps.Places.V1; // Initialize a new SearchTextRequest object var request = new SearchTextRequest(); ``` -------------------------------- ### Instantiate FuelOptions Class (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.FuelOptions Provides examples of how to instantiate the FuelOptions class using its default constructor or by copying an existing FuelOptions object. ```csharp public FuelOptions() ``` ```csharp public FuelOptions(FuelOptions other) ``` -------------------------------- ### Get Photo Media with String Name (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.PlacesClient Shows how to retrieve photo media using the photo media name provided as a string. The sample code includes client creation, specifying the name string, and calling the GetPhotoMedia method. ```csharp // 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); ``` -------------------------------- ### Autocomplete Places Request Example (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.PlacesClient This C# code snippet demonstrates how to create a PlacesClient and make an AutocompletePlaces request. It shows the initialization of the request object with various parameters and the subsequent call to the AutocompletePlaces method. Note that the field mask must be set via the X-Goog-FieldMask HTTP header for most requests. ```csharp // Create client PlacesClient placesClient = PlacesClient.Create(); // Initialize request argument(s) AutocompletePlacesRequest request = new AutocompletePlacesRequest { Input = "", LocationBias = new AutocompletePlacesRequest.Types.LocationBias(), LocationRestriction = new AutocompletePlacesRequest.Types.LocationRestriction(), IncludedPrimaryTypes = { "", }, IncludedRegionCodes = { "", }, LanguageCode = "", RegionCode = "", Origin = new LatLng(), InputOffset = 0, IncludeQueryPredictions = false, SessionToken = "", IncludePureServiceAreaBusinesses = false, }; // Make the request AutocompletePlacesResponse response = placesClient.AutocompletePlaces(request); ``` -------------------------------- ### Get Photo Media Asynchronously with PhotoMediaName (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.PlacesClient This snippet demonstrates the asynchronous retrieval of photo media using a PhotoMediaName object. It shows how to construct the PhotoMediaName from a place ID and photo reference. This method is efficient for directly referencing photo media resources. ```csharp // 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); ``` -------------------------------- ### PhotoName String Representation and Operators Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.PhotoName This section covers the method for getting the string representation of a PhotoName object and the overloaded equality operators. ```APIDOC ## PhotoName.ToString() ### Description The string representation of the resource name. ### Method `override string ToString()` ### Returns #### Success Response (string) - **string** - The string representation of the resource name. ### Remarks Overrides `object.ToString()` and implements `IResourceName.ToString()`. ``` ```APIDOC ## PhotoName Equality Operators ### Description Operators for comparing two PhotoName instances for equality or inequality. ### Method `static bool operator ==(PhotoName a, PhotoName b)` ### Description Determines whether two specified resource names have the same value. ### Parameters #### Path Parameters - **a** (PhotoName) - Required - The first resource name to compare, or null. - **b** (PhotoName) - Required - The second resource name to compare, or null. ### Returns #### Success Response (bool) - **bool** - `true` if the value of `a` is the same as the value of `b`; otherwise, `false`. ### Method `static bool operator !=(PhotoName a, PhotoName b)` ### Description Determines whether two specified resource names have different values. ### Parameters #### Path Parameters - **a** (PhotoName) - Required - The first resource name to compare, or null. - **b** (PhotoName) - Required - The second resource name to compare, or null. ### Returns #### Success Response (bool) - **bool** - `true` if the value of `a` is different from the value of `b`; otherwise, `false`. ``` -------------------------------- ### Get ReviewSummary Property (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place Retrieves an AI-generated summary of the place based on user reviews. The type of this property is Place.Types.ReviewSummary. ```csharp public Place.Types.ReviewSummary ReviewSummary { get; set; } ``` -------------------------------- ### Get Photo Media (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Places.PlacesClient Retrieves photo media using a photo reference string. Supports synchronous calls with optional metadata, deadlines, and cancellation tokens, as well as asynchronous calls with CallOptions or metadata/deadline/cancellation tokens. ```csharp public virtual PhotoMedia GetPhotoMedia(GetPhotoMediaRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default) { // Implementation details... return null; } ``` ```csharp public virtual AsyncUnaryCall GetPhotoMediaAsync(GetPhotoMediaRequest request, CallOptions options) { // Implementation details... return null; } ``` ```csharp public virtual AsyncUnaryCall GetPhotoMediaAsync(GetPhotoMediaRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default) { // Implementation details... return null; } ``` -------------------------------- ### Get and Set LongText Property (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place.Types.AddressComponent Provides an example of getting and setting the LongText property for an AddressComponent in C#. This property holds the full text description or name of the address component, such as the country name. ```csharp public string LongText { get; set; } ``` -------------------------------- ### Get String Representation of PhotoName (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.PhotoName Returns the string representation of the PhotoName resource name. This method overrides the base object.ToString() and implements IResourceName.ToString(). ```csharp public override string ToString() { // Implementation details return ""; // Placeholder } ``` -------------------------------- ### Get Default PlacesSettings (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.PlacesSettings Retrieves a new instance of the default PlacesSettings, providing a starting point for configuring the PlacesClient. ```csharp public static PlacesSettings GetDefault(); ``` -------------------------------- ### Instantiate Place.Types.ReviewSummary with Existing Instance (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place.Types.ReviewSummary This C# code demonstrates how to create a new instance of Place.Types.ReviewSummary by copying an existing ReviewSummary object. The constructor takes another ReviewSummary object as a parameter to facilitate deep cloning or initialization with existing data. ```csharp public ReviewSummary(Place.Types.ReviewSummary other) ``` -------------------------------- ### StartOffset Property (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.AutocompletePlacesResponse.Types.Suggestion.Types.StringRange Represents the zero-based offset of the first Unicode character of a substring, inclusive. This property allows for getting and setting the starting offset of the identified string range. ```csharp public int StartOffset { get; set; } ``` -------------------------------- ### Places Client Initialization Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Places.PlacesClient Constructors for initializing the PlacesClient. These allow for custom call invokers, channel bases, or client configurations. ```APIDOC ## PlacesClient Constructors ### PlacesClient() Protected parameterless constructor to allow creation of test doubles. ### PlacesClient(CallInvoker callInvoker) Creates a new client for Places that uses a custom `CallInvoker`. ### PlacesClient(ChannelBase channel) Creates a new client for Places. ### PlacesClient(ClientBase.ClientBaseConfiguration configuration) Protected constructor to allow creation of configured clients. ``` -------------------------------- ### Get TimeZone Property (.NET) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place This snippet shows the declaration for the 'TimeZone' property, which represents the IANA Time Zone Database time zone for a place. For example, 'America/New_York'. ```csharp public TimeZone TimeZone { get; set; } ``` -------------------------------- ### Get Photo Media Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.PlacesClient Retrieves photo media using a photo reference string. Supports multiple methods for specifying the request, including using a `GetPhotoMediaRequest` object or a `PhotoMediaName` object. ```APIDOC ## GET /v1/places/{place_id}/photos/{photo_reference}/media ### Description Retrieves a photo media using a photo reference string. The resource name of a photo as returned in a Place object's `photos.name` field comes with the format `places/{place_id}/photos/{photo_reference}`. You need to append `/media` at the end of the photo resource to get the photo media resource name. ### Method GET ### Endpoint `/v1/places/{place_id}/photos/{photo_reference}/media` ### Parameters #### Path Parameters - **place_id** (string) - Required - The ID of the place associated with the photo. - **photo_reference** (string) - Required - The photo reference string. #### Query Parameters - **maxWidthPx** (integer) - Optional - Specifies the desired width in pixels for the photo. If not specified, the service may return the photo at its original width. - **maxHeightPx** (integer) - Optional - Specifies the desired height in pixels for the photo. If not specified, the service may return the photo at its original height. - **skipHttpRedirect** (boolean) - Optional - If true, the API will return a `PhotoMedia` object with a `photo_uri` field containing a URL that is not a redirect. If false (default), the `photo_uri` will be a redirect to the actual photo URL. ### Request Example (Using GetPhotoMediaRequest) ```json { "photoMediaName": "places/[PLACE_ID]/photos/[PHOTO_REFERENCE]/media", "maxWidthPx": 400, "maxHeightPx": 300, "skipHttpRedirect": false } ``` ### Response #### Success Response (200) - **photoUri** (string) - The URI of the photo media. - **contentType** (string) - The content type of the photo media. #### Response Example ```json { "photoUri": "https://example.com/path/to/photo.jpg", "contentType": "image/jpeg" } ``` ``` -------------------------------- ### GlobalCode Property (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place.Types.PlusCode Gets or sets the global (full) code for the place. This represents a specific geographical area, approximately 14 by 14 meters. Example: '9FWM33GV+HQ'. ```csharp public string GlobalCode { get; set; } ``` -------------------------------- ### Create PlacesClient (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.PlacesClient Shows how to synchronously and asynchronously create an instance of the PlacesClient. The default constructor uses default credentials, endpoint, and settings. For custom configurations, PlacesClientBuilder should be used. ```csharp public static PlacesClient Create() { // Implementation details for synchronous creation } ``` ```csharp public static Task CreateAsync(CancellationToken cancellationToken = default) { // Implementation details for asynchronous creation } ``` -------------------------------- ### CompoundCode Property (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place.Types.PlusCode Gets or sets the compound code for the place. This format includes a formatted name of a reference entity, replacing the prefix of the global code. Example: '33GV+HQ, Ramberg, Norway'. ```csharp public string CompoundCode { get; set; } ``` -------------------------------- ### Get Place Details using PlacesClient (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.PlacesClient Demonstrates how to create a PlacesClient and retrieve a specific place's details using its name. This method returns a Task which resolves to the Place object upon completion. ```csharp // 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); ``` -------------------------------- ### PlacesClient Constructors Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Places.PlacesClient Provides constructors for initializing the Places.PlacesClient. These include a protected parameterless constructor, constructors accepting a CallInvoker or ChannelBase for custom configurations, and a protected constructor for configured clients. ```csharp protected PlacesClient() ``` ```csharp public PlacesClient(CallInvoker callInvoker) ``` ```csharp public PlacesClient(ChannelBase channel) ``` ```csharp protected PlacesClient(ClientBase.ClientBaseConfiguration configuration) ``` -------------------------------- ### Build PlacesClient Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.PlacesClientBuilder Constructs and returns a new PlacesClient instance using the configured settings of the builder. This method is synchronous. ```csharp PlacesClientBuilder builder = new PlacesClientBuilder(); // Configure builder settings if needed PlacesClient client = builder.Build(); ``` -------------------------------- ### Get Photo Media Endpoint Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.GetPhotoMediaRequest This section describes how to construct a request to get photo media for a place, including specifying dimensions and handling redirects. ```APIDOC ## GET /v1/{name=places/*/photos/*/media} ### Description Fetches a photo of a place using its resource name. This endpoint allows specifying maximum dimensions and controlling HTTP redirects. ### Method GET ### Endpoint /v1/{name=places/*/photos/*/media} ### Parameters #### Path Parameters - **name** (string) - Required - The resource name of a photo media in the format: `places/{place_id}/photos/{photo_reference}/media`. The resource name of a photo as returned in a Place object's `photos.name` field comes with the format `places/{place_id}/photos/{photo_reference}`. You need to append `/media` at the end of the photo resource to get the photo media resource name. #### Query Parameters - **maxHeightPx** (integer) - Optional - Specifies the maximum desired height, in pixels, of the image. Accepts an integer between 1 and 4800. If the image is smaller than the values specified, the original image will be returned. If the image is larger in either dimension, it will be scaled to match the smaller of the two dimensions, restricted to its original aspect ratio. At least one of `max_height_px` or `max_width_px` needs to be specified. - **maxWidthPx** (integer) - Optional - Specifies the maximum desired width, in pixels, of the image. Accepts an integer between 1 and 4800. If the image is smaller than the values specified, the original image will be returned. If the image is larger in either dimension, it will be scaled to match the smaller of the two dimensions, restricted to its original aspect ratio. At least one of `max_height_px` or `max_width_px` needs to be specified. - **skipHttpRedirect** (boolean) - Optional - If set to `true`, skips the default HTTP redirect behavior and returns a text format response (e.g., JSON). If not set, an HTTP redirect to the image media will be issued. This option is ignored for non-HTTP requests. ### Request Example ```json { "name": "places/ChIJN1t_tDeuEmsRUsoyG83fr_4/photos/1234567890abcdef1234567890abcdef/media", "maxHeightPx": 400, "maxWidthPx": 600, "skipHttpRedirect": false } ``` ### Response #### Success Response (200) - **image_data** (binary) - The binary data of the photo image. - **content_type** (string) - The MIME type of the photo image (e.g., `image/jpeg`). #### Response Example (Returns binary image data or a JSON object with redirect information if `skipHttpRedirect` is true and the request is not an HTTP request) ```json { "redirectUrl": "https://example.com/path/to/image.jpg" } ``` ### Error Handling - **INVALID_ARGUMENT**: Returned if `maxHeightPx` or `maxWidthPx` are outside the allowed range (1-4800), or if neither is specified. ``` -------------------------------- ### Get and Set Takeout Property (.NET) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place This snippet demonstrates how to get and set the 'Takeout' property, which indicates if a business supports takeout services. It's a boolean value. ```csharp public bool Takeout { get; set; } ``` -------------------------------- ### Instantiate Place.Types.ReviewSummary with Default Constructor (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place.Types.ReviewSummary This C# code snippet shows the default constructor for the Place.Types.ReviewSummary class. It allows for the creation of a new instance of ReviewSummary without any initial parameters. ```csharp public ReviewSummary() ``` -------------------------------- ### Get and Set LanguageCode Property (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place.Types.AddressComponent Illustrates how to get and set the LanguageCode property of the AddressComponent class in C#. This property represents the language used for formatting the address component, using CLDR notation. ```csharp public string LanguageCode { get; set; } ``` -------------------------------- ### Instantiate Places API Client Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Places.PlacesClient Creates a new instance of the PlacesClient using the provided ClientBaseConfiguration. This is essential for interacting with the Google Maps Places API. ```csharp protected override Places.PlacesClient NewInstance(ClientBase.ClientBaseConfiguration configuration) ``` -------------------------------- ### Get Photo Media Asynchronously with Request Object (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.PlacesClient This snippet shows how to asynchronously retrieve photo media using a GetPhotoMediaRequest object. It includes options for specifying maximum dimensions and skipping HTTP redirects. This method is useful for more complex requests where specific parameters need to be configured. ```csharp // 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); ``` -------------------------------- ### C# Place.Types.ConsumerAlert.Types.Details Constructor Syntax Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place.Types.ConsumerAlert.Types.Details Demonstrates the C# syntax for the default constructor of the Place.Types.ConsumerAlert.Types.Details class. This constructor initializes a new instance of the class. ```csharp public Details() ``` -------------------------------- ### Get Channel Pool for PlacesClientBuilder Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.PlacesClientBuilder Retrieves the channel pool used by the builder when no other specific channel options are provided. This is an internal protected method. ```csharp // This is a protected method and typically not called directly, but shown for completeness. // Example usage within a derived class or internal logic: ChannelPool pool = GetChannelPool(); ``` -------------------------------- ### RoutingSummary Constructors (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.RoutingSummary Provides the syntax for the default and copy constructors of the RoutingSummary class. The default constructor initializes a new instance, while the copy constructor creates a new instance with the same values as another RoutingSummary object. ```csharp public RoutingSummary() ``` ```csharp public RoutingSummary(RoutingSummary other) ``` -------------------------------- ### Get ServesWine Property (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place Indicates whether the place serves wine. This is a boolean property. ```csharp public bool ServesWine { get; set; } ``` -------------------------------- ### Get ServesLunch Property (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place Indicates whether the place serves lunch. This is a boolean property. ```csharp public bool ServesLunch { get; set; } ``` -------------------------------- ### PhotoMediaName Constructors Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.PhotoMediaName Constructs a new instance of a PhotoMediaName class. ```APIDOC ## PhotoMediaName Constructors ### PhotoMediaName(string placeId, string photoReferenceId) Constructs a new instance of a PhotoMediaName class from the component parts of pattern `places/{place_id}/photos/{photo_reference}/media`. #### Parameters - **placeId** (string) - Required - The `Place` ID. Must not be `null` or empty. - **photoReferenceId** (string) - Required - The `PhotoReference` ID. Must not be `null` or empty. ### PhotoMediaName.FromUnparsed(UnparsedResourceName unparsedResourceName) Creates a PhotoMediaName containing an unparsed resource name. #### Parameters - **unparsedResourceName** (UnparsedResourceName) - Required - The unparsed resource name. Must not be `null`. ``` -------------------------------- ### Get ServesDinner Property (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place Indicates whether the place serves dinner. This is a boolean property. ```csharp public bool ServesDinner { get; set; } ``` -------------------------------- ### PhotoMedia Constructors (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.PhotoMedia Provides the C# declarations for the two constructors of the PhotoMedia class. The default constructor PhotoMedia() initializes a new instance. The overloaded constructor PhotoMedia(PhotoMedia other) creates a new instance with the same values as another PhotoMedia object. ```csharp public PhotoMedia() ``` ```csharp public PhotoMedia(PhotoMedia other) ``` -------------------------------- ### Get ServesDessert Property (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place Indicates whether the place serves dessert. This is a boolean property. ```csharp public bool ServesDessert { get; set; } ``` -------------------------------- ### Try Parse PhotoName Resource Name (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.PhotoName Attempts to parse the given resource name string into a PhotoName instance without throwing an exception. Returns true if successful, false otherwise. The parsed result is returned via the `result` out parameter. The expected format is `places/{place}/photos/{photo}`. ```csharp public static bool TryParse(string photoName, out PhotoName result) { // Implementation details result = null; return false; // Placeholder } ``` -------------------------------- ### Get ServesCoffee Property (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place Indicates whether the place serves coffee. This is a boolean property. ```csharp public bool ServesCoffee { get; set; } ``` -------------------------------- ### Get ServesCocktails Property (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place Indicates whether the place serves cocktails. This is a boolean property. ```csharp public bool ServesCocktails { get; set; } ``` -------------------------------- ### Get ServesBrunch Property (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place Indicates whether the place serves brunch. This is a boolean property. ```csharp public bool ServesBrunch { get; set; } ``` -------------------------------- ### Instantiate ParkingOptions Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place.Types.ParkingOptions Demonstrates how to create a new instance of the ParkingOptions class. This constructor initializes a default ParkingOptions object. ```csharp public ParkingOptions() ``` -------------------------------- ### Get ServesBreakfast Property (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place Indicates whether the place serves breakfast. This is a boolean property. ```csharp public bool ServesBreakfast { get; set; } ``` -------------------------------- ### Get ServesBeer Property (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place Indicates whether the place serves beer. This is a boolean property. ```csharp public bool ServesBeer { get; set; } ``` -------------------------------- ### EVOptions Constructor Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.SearchTextRequest.Types.EVOptions Provides constructors for initializing an EVOptions object. The default constructor creates a new instance, while the copy constructor creates a new instance with the same field values as the specified instance. ```csharp public EVOptions() ``` ```csharp public EVOptions(SearchTextRequest.Types.EVOptions other) ``` -------------------------------- ### Instantiate ReviewName Class (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.ReviewName Demonstrates how to create a new instance of the ReviewName class using place and review IDs. This constructor is useful when you have the individual components of a review resource name. ```csharp using Google.Maps.Places.V1; // Example usage: string placeId = "YOUR_PLACE_ID"; string reviewId = "YOUR_REVIEW_ID"; ReviewName reviewName = new ReviewName(placeId, reviewId); ``` -------------------------------- ### Get Restroom Property (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place Indicates whether the place has a restroom available. This is a boolean property. ```csharp public bool Restroom { get; set; } ``` -------------------------------- ### SearchTextResponse Constructors (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.SearchTextResponse Provides the syntax for the default constructor and a copy constructor for the SearchTextResponse class. The default constructor initializes a new instance, while the copy constructor creates a new instance with the same values as a specified SearchTextResponse instance. ```csharp public SearchTextResponse() ``` ```csharp public SearchTextResponse(SearchTextResponse other) ``` -------------------------------- ### Get Reservable Property (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place Indicates whether the place supports reservations. This is a boolean property. ```csharp public bool Reservable { get; set; } ``` -------------------------------- ### Place Class Constructors (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place Provides the default constructor for the `Place` class, used to create a new instance, and a copy constructor that initializes a new `Place` instance with the values from another `Place` object. ```csharp public Place() public Place(Place other) ``` -------------------------------- ### Get ShortFormattedAddress Property (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place Retrieves a short, human-readable address for the place. This property is of type string. ```csharp public string ShortFormattedAddress { get; set; } ``` -------------------------------- ### Get ServesVegetarianFood Property (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place Indicates whether the place serves vegetarian food. This is a boolean property. ```csharp public bool ServesVegetarianFood { get; set; } ``` -------------------------------- ### Compare PhotoName Instances for Inequality (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.PhotoName Determines whether two specified PhotoName resource names have different values using the inequality operator (!=). Compares the string representations of the resource names. ```csharp public static bool operator !=(PhotoName a, PhotoName b) { // Implementation details return true; // Placeholder } ``` -------------------------------- ### Get SubDestinations Property (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place Retrieves a list of sub-destinations related to the place. This property is of type RepeatedField. ```csharp public RepeatedField SubDestinations { get; } ``` -------------------------------- ### PhotoName Parsing Methods Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.PhotoName This section details the methods for parsing resource name strings into PhotoName objects, including options for handling unparseable names. ```APIDOC ## PhotoName.Parse(string, bool) ### Description Parses the given resource name string into a new PhotoName instance; optionally allowing an unparseable resource name. ### Method `static PhotoName Parse(string photoName, bool allowUnparsed)` ### Parameters #### Path Parameters - **photoName** (string) - Required - The resource name in string form. Must not be `null`. - **allowUnparsed** (bool) - Required - If `true` will successfully store an unparseable resource name into the UnparsedResource property; otherwise will throw an ArgumentException if an unparseable resource name is specified. ### Returns #### Success Response (PhotoName) - **PhotoName** - The parsed PhotoName if successful. ### Remarks To parse successfully, the resource name must be formatted as one of the following: * `places/{place}/photos/{photo}` Or may be in any format if `allowUnparsed` is `true`. ``` ```APIDOC ## PhotoName.TryParse(string, out PhotoName) ### Description Tries to parse the given resource name string into a new PhotoName instance. ### Method `static bool TryParse(string photoName, out PhotoName result)` ### Parameters #### Path Parameters - **photoName** (string) - Required - The resource name in string form. Must not be `null`. - **result** (PhotoName) - Required - When this method returns, the parsed PhotoName, or `null` if parsing failed. ### Returns #### Success Response (bool) - **bool** - `true` if the name was parsed successfully; `false` otherwise. ### Remarks To parse successfully, the resource name must be formatted as one of the following: * `places/{place}/photos/{photo}` ``` ```APIDOC ## PhotoName.TryParse(string, bool, out PhotoName) ### Description Tries to parse the given resource name string into a new PhotoName instance; optionally allowing an unparseable resource name. ### Method `static bool TryParse(string photoName, bool allowUnparsed, out PhotoName result)` ### Parameters #### Path Parameters - **photoName** (string) - Required - The resource name in string form. Must not be `null`. - **allowUnparsed** (bool) - Required - If `true` will successfully store an unparseable resource name into the UnparsedResource property; otherwise will throw an ArgumentException if an unparseable resource name is specified. - **result** (PhotoName) - Required - When this method returns, the parsed PhotoName, or `null` if parsing failed. ### Returns #### Success Response (bool) - **bool** - `true` if the name was parsed successfully; `false` otherwise. ### Remarks To parse successfully, the resource name must be formatted as one of the following: * `places/{place}/photos/{photo}` Or may be in any format if `allowUnparsed` is `true`. ``` -------------------------------- ### GetPlace Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.PlacesClientImpl Retrieves the details of a place based on its resource name. This is useful for getting comprehensive information about a specific location. ```APIDOC ## GET /v1/places/{placeId} ### Description Retrieves the details of a place based on its resource name, which is a string in the `places/{place_id}` format. ### Method GET ### Endpoint /v1/places/{placeId} ### Parameters #### Path Parameters - **placeId** (string) - Required - The identifier of the place, in the format `places/{place_id}`. #### Query Parameters - **languageCode** (string) - Optional - The language in which to return information, specified as a Language Tag (BCP 47). - **region** (string) - Optional - The region to search from. If not specified, the region of the response is inferred from the request's IP address. - **sessionToken** (string) - Optional - A string that uniquely identifies an autocomplete session. - **fields** (string) - Optional - A comma-separated list of fields to return. If not specified, all fields are returned. ### Request Example (No request body for GET requests) ### Response #### Success Response (200) - **place** (Place) - A Place object containing details about the place. #### Response Example ```json { "place": { "name": "Google Sydney", "formattedAddress": "161 Clarence St, Sydney NSW 2000, Australia", "geometry": { "location": { "latitude": -33.867487, "longitude": 151.207259 } } } } ``` ``` -------------------------------- ### C# Constructor: EvChargeAmenitySummary() Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place.Types.EvChargeAmenitySummary Provides the default constructor for the Place.Types.EvChargeAmenitySummary class. This initializes a new instance of the class without any specific arguments. ```csharp public EvChargeAmenitySummary() ``` -------------------------------- ### DistanceMeters Property Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.RoutingSummary.Types.Leg Gets or sets the distance, in meters, for this leg of the trip. The value is an integer representing the total distance. ```csharp public int DistanceMeters { get; set; } ``` -------------------------------- ### BindService with PlacesBase in C# Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Places Creates a service definition that can be registered with a server. This method requires an implementation of the server-side handling logic. ```csharp public static ServerServiceDefinition BindService(Places.PlacesBase serviceImpl) ``` -------------------------------- ### Place Properties Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place This section details various properties of a place, including their types, descriptions, and in some cases, example declarations. ```APIDOC ## Place Properties ### Description This section details various properties of a place, including their types, descriptions, and in some cases, example declarations. ### Properties #### Takeout Specifies if the business supports takeout. ##### Declaration ```csharp public bool Takeout { get; set; } ``` ##### Property Value - **Type**: `bool` #### TimeZone IANA Time Zone Database time zone. For example "America/New_York". ##### Declaration ```csharp public TimeZone TimeZone { get; set; } ``` ##### Property Value - **Type**: `TimeZone` #### Types_ A set of type tags for this result. For example, "political" and "locality". For the complete list of possible values, see Table A and Table B at https://developers.google.com/maps/documentation/places/web-service/place-types ##### Declaration ```csharp public RepeatedField Types_ { get; } ``` ##### Property Value - **Type**: `RepeatedField` #### UserRatingCount The total number of reviews (with or without text) for this place. ##### Declaration ```csharp public int UserRatingCount { get; set; } ``` ##### Property Value - **Type**: `int` #### UtcOffsetMinutes Number of minutes this place's timezone is currently offset from UTC. This is expressed in minutes to support timezones that are offset by fractions of an hour, e.g. X hours and 15 minutes. ##### Declaration ```csharp public int UtcOffsetMinutes { get; set; } ``` ##### Property Value - **Type**: `int` #### Viewport A viewport suitable for displaying the place on an average-sized map. This viewport should not be used as the physical boundary or the service area of the business. ##### Declaration ```csharp public Viewport Viewport { get; set; } ``` ##### Property Value - **Type**: `Viewport` #### WebsiteUri The authoritative website for this place, e.g. a business' homepage. Note that for places that are part of a chain (e.g. an IKEA store), this will usually be the website for the individual store, not the overall chain. ##### Declaration ```csharp public string WebsiteUri { get; set; } ``` ##### Property Value - **Type**: `string` ``` -------------------------------- ### PlusCode(Place.Types.PlusCode) Constructor (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place.Types.PlusCode Initializes a new instance of the Place.Types.PlusCode class with a copy of another PlusCode object. This allows for creating a duplicate PlusCode instance. ```csharp public PlusCode(Place.Types.PlusCode other) ``` -------------------------------- ### Photo Copy Constructor (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Photo Shows the C# syntax for the copy constructor of the Photo class. This constructor allows for the creation of a new Photo object by copying the properties of an existing one. ```csharp public Photo(Photo other) ``` -------------------------------- ### SearchAlongRouteParameters.Polyline Property - C# Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.SearchTextRequest.Types.SearchAlongRouteParameters Gets or sets the route polyline for the SearchAlongRouteParameters. This property is required and expects a Polyline object representing the route. ```csharp public Polyline Polyline { get; set; } ``` -------------------------------- ### Create PhotoName from IDs (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.PhotoName Creates a new PhotoName instance using the specified Place ID and Photo ID. This is a factory method that encapsulates the creation logic. ```csharp string placeId = "your_place_id"; string photoId = "your_photo_id"; PhotoName photoName = PhotoName.FromPlacePhoto(placeId, photoId); ``` -------------------------------- ### Parse PhotoName Resource Name (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.PhotoName Parses a given resource name string into a PhotoName instance. Optionally allows an unparseable resource name to be stored if `allowUnparsed` is true. Throws an ArgumentException for unparseable names if `allowUnparsed` is false. The expected format is `places/{place}/photos/{photo}`. ```csharp public static PhotoName Parse(string photoName, bool allowUnparsed) { // Implementation details return null; // Placeholder } ``` -------------------------------- ### C# HighlightedTextRange StartIndex Property Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.ContextualContent.Types.Justification.Types.ReviewJustification.Types.HighlightedText.Types.HighlightedTextRange Represents the starting index of the highlighted text range. This property is of type integer and can be both read and set. ```csharp public int StartIndex { get; set; } ``` -------------------------------- ### Compare PhotoName Instances for Equality (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.PhotoName Determines whether two specified PhotoName resource names have the same value using the equality operator (==). Compares the string representations of the resource names. ```csharp public static bool operator ==(PhotoName a, PhotoName b) { // Implementation details return false; // Placeholder } ``` -------------------------------- ### Create PhotoName from Unparsed Resource Name (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.PhotoName Creates a PhotoName instance that holds an unparsed resource name. This is useful when the resource name format is not recognized or needs to be preserved as-is. ```csharp UnparsedResourceName unparsed = new UnparsedResourceName("some_unparsed_name"); PhotoName photoName = PhotoName.FromUnparsed(unparsed); ``` -------------------------------- ### Duration Property Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.RoutingSummary.Types.Leg Gets or sets the duration it takes to complete this leg of the trip. The value is of type Duration, representing the time taken. ```csharp public Duration Duration { get; set; } ``` -------------------------------- ### Photo Constructor (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Photo Provides the C# syntax for the default constructor of the Photo class. This constructor is used to create a new instance of the Photo object. ```csharp public Photo() ``` -------------------------------- ### Set Paid Garage Parking Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place.Types.ParkingOptions Demonstrates setting the boolean property for paid garage parking availability. This property can be accessed to get or set its value. ```csharp public bool PaidGarageParking { get; set; } ``` -------------------------------- ### C# Property: Overview Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place.Types.EvChargeAmenitySummary An overview of all available amenities at the electric vehicle charging station. This property is guaranteed to be provided and returns a ContentBlock object. ```csharp public ContentBlock Overview { get; set; } ``` -------------------------------- ### LocationRestriction.TypeCase Property Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.SearchTextRequest.Types.LocationRestriction Gets the type of the location restriction currently set. This property indicates whether the restriction is defined by a rectangle or another (unspecified) type. ```csharp public SearchTextRequest.Types.LocationRestriction.TypeOneofCase TypeCase { get; } ``` -------------------------------- ### PhotoMediaName Methods Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.PhotoMediaName Methods for formatting and parsing PhotoMediaName resources. ```APIDOC ## PhotoMediaName Methods ### Format(string placeId, string photoReferenceId) Formats the IDs into the string representation of this PhotoMediaName with pattern `places/{place_id}/photos/{photo_reference}/media`. #### Parameters - **placeId** (string) - Required - The `Place` ID. Must not be `null` or empty. - **photoReferenceId** (string) - Required - The `PhotoReference` ID. Must not be `null` or empty. #### Returns - **string** - The string representation of this PhotoMediaName. ### FormatPlacePhotoReference(string placeId, string photoReferenceId) Formats the IDs into the string representation of this PhotoMediaName with pattern `places/{place_id}/photos/{photo_reference}/media`. #### Parameters - **placeId** (string) - Required - The `Place` ID. Must not be `null` or empty. - **photoReferenceId** (string) - Required - The `PhotoReference` ID. Must not be `null` or empty. #### Returns - **string** - The string representation of this PhotoMediaName. ### FromPlacePhotoReference(string placeId, string photoReferenceId) Creates a PhotoMediaName with the pattern `places/{place_id}/photos/{photo_reference}/media`. #### Parameters - **placeId** (string) - Required - The `Place` ID. Must not be `null` or empty. - **photoReferenceId** (string) - Required - The `PhotoReference` ID. Must not be `null` or empty. #### Returns - **PhotoMediaName** - A new instance of PhotoMediaName constructed from the provided ids. ### GetHashCode() Returns a hash code for this resource name. #### Returns - **int** - A hash code for this resource name. ### Parse(string resourceName) Parses the given resource name string into a new PhotoMediaName instance. #### Parameters - **resourceName** (string) - Required - The resource name string to parse. #### Returns - **PhotoMediaName** - A new instance of PhotoMediaName parsed from the string. ``` -------------------------------- ### Try Parse PhotoName Resource Name with Allow Unparsed (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.PhotoName Attempts to parse the given resource name string into a PhotoName instance, optionally allowing an unparseable resource name. Returns true if successful, false otherwise. The parsed result is returned via the `result` out parameter. If `allowUnparsed` is true, any format is accepted; otherwise, the format must be `places/{place}/photos/{photo}`. ```csharp public static bool TryParse(string photoName, bool allowUnparsed, out PhotoName result) { // Implementation details result = null; return false; // Placeholder } ``` -------------------------------- ### ReviewJustification Property (.NET) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.ContextualContent.Types.Justification Gets or sets the ReviewJustification for the place. This property contains justification details derived from reviews and is also marked as experimental. ```csharp public ContextualContent.Types.Justification.Types.ReviewJustification ReviewJustification { get; set; } ``` -------------------------------- ### Instantiate Place.Types.PaymentOptions (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place.Types.PaymentOptions Provides constructors for the Place.Types.PaymentOptions class in C#. The default constructor initializes a new instance, while the parameterized constructor creates a new instance with the same values as a specified existing instance. ```csharp public PaymentOptions() ``` ```csharp public PaymentOptions(Place.Types.PaymentOptions other) ``` -------------------------------- ### Set Free Parking Lot Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place.Types.ParkingOptions Illustrates how to set the boolean property indicating if the place offers free parking lots. This property is accessible for both getting and setting its value. ```csharp public bool FreeParkingLot { get; set; } ``` -------------------------------- ### Review Constructor (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Review The default constructor for the Review class in C#. This constructor initializes a new instance of the Review class without any parameters. It's used for creating a new review object. ```csharp public Review() ``` -------------------------------- ### BusinessAvailabilityAttributesJustification Property (.NET) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.ContextualContent.Types.Justification Gets or sets the BusinessAvailabilityAttributesJustification for the place. This property holds justification details related to business availability attributes and is marked as experimental. ```csharp public ContextualContent.Types.Justification.Types.BusinessAvailabilityAttributesJustification BusinessAvailabilityAttributesJustification { get; set; } ``` -------------------------------- ### C# Constructor: EvChargeAmenitySummary(EvChargeAmenitySummary) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place.Types.EvChargeAmenitySummary Initializes a new instance of the Place.Types.EvChargeAmenitySummary class by copying the values from another EvChargeAmenitySummary object. This is useful for creating a mutable copy of an existing summary. ```csharp public EvChargeAmenitySummary(Place.Types.EvChargeAmenitySummary other) ``` -------------------------------- ### ReviewJustification HighlightedText Property Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.ContextualContent.Types.Justification.Types.ReviewJustification This C# snippet shows the declaration for the HighlightedText property of the ReviewJustification class. It allows getting and setting the highlighted text portion of a review. ```csharp public ContextualContent.Types.Justification.Types.ReviewJustification.Types.HighlightedText HighlightedText { get; set; } ``` -------------------------------- ### Configure PlacesClientBuilder Settings Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.PlacesClientBuilder Sets the specific PlacesSettings to be used for RPCs when building the PlacesClient. If not provided, default settings will be used. ```csharp PlacesClientBuilder builder = new PlacesClientBuilder(); builder.Settings = new PlacesSettings { // Configure settings here, e.g., Endpoint, Credentials, etc. }; ``` -------------------------------- ### FormattableText.Text Property (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.AutocompletePlacesResponse.Types.Suggestion.Types.FormattableText Gets or sets the text content that can be used as is or formatted using the 'Matches' property. This property holds the predicted place or query text. ```csharp public string Text { get; set; } ``` -------------------------------- ### Initialize AccessibilityOptions Class Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place.Types.AccessibilityOptions Provides constructors for the Place.Types.AccessibilityOptions class. The default constructor initializes an empty object, while the parameterized constructor creates a new instance based on an existing one. ```csharp public AccessibilityOptions() ``` ```csharp public AccessibilityOptions(Place.Types.AccessibilityOptions other) ``` -------------------------------- ### SpecialDay Date Property Declaration (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place.Types.OpeningHours.Types.SpecialDay The C# declaration for the 'Date' property of the SpecialDay class. This property allows getting and setting the date associated with the special day. ```csharp public Date Date { get; set; } ``` -------------------------------- ### StartPrice Property (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.PriceRange Represents the low end of the price range (inclusive). The value of this property indicates the lower limit for the price, meaning prices should be at or above this amount. It uses the Money type for currency representation. ```csharp public Money StartPrice { get; set; } ``` -------------------------------- ### Id Property Definition (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place.Types.ContainingPlace Defines the 'Id' property for the Place.Types.ContainingPlace class. This property holds the place ID of the containing place and is accessible for both getting and setting its value. ```csharp public string Id { get; set; } ``` -------------------------------- ### Instantiate NeighborhoodSummary Constructor (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place.Types.NeighborhoodSummary This C# code demonstrates the default constructor for the Place.Types.NeighborhoodSummary class, used to create a new instance of the summary object. ```csharp public NeighborhoodSummary() ``` -------------------------------- ### JustificationCase Property (.NET) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.ContextualContent.Types.Justification Gets the current type of justification being represented by the object. This property indicates which specific justification field (e.g., BusinessAvailabilityAttributesJustification, ReviewJustification) is set. ```csharp public ContextualContent.Types.Justification.JustificationOneofCase JustificationCase { get; } ``` -------------------------------- ### Access Place.Types.ReviewSummary Properties (C#) Source: https://googleapis.dev/dotnet/Google.Maps.Places.V1/latest/api/Google.Maps.Places.V1.Place.Types.ReviewSummary This C# code illustrates the properties available within the Place.Types.ReviewSummary class. These include DisclosureText (LocalizedText), FlagContentUri (string), ReviewsUri (string), and Text (LocalizedText), allowing retrieval and modification of summary-related information. ```csharp public LocalizedText DisclosureText { get; set; } public string FlagContentUri { get; set; } public string ReviewsUri { get; set; } public LocalizedText Text { get; set; } ```