### Manage Example Store Operations Source: https://github.com/byron/google-apis-rs/blob/main/gen/aiplatform1/README.md Examples for creating, deleting, and patching example stores. Operations for getting and waiting are also included. ```rust let r = hub.projects().locations_example_stores_operations_get(...).doit().await ``` ```rust let r = hub.projects().locations_example_stores_operations_wait(...).doit().await ``` ```rust let r = hub.projects().locations_example_stores_create(...).doit().await ``` ```rust let r = hub.projects().locations_example_stores_delete(...).doit().await ``` ```rust let r = hub.projects().locations_example_stores_patch(...).doit().await ``` -------------------------------- ### Complete Example: Setting up and making an API call Source: https://github.com/byron/google-apis-rs/blob/main/gen/binaryauthorization1/README.md A full example demonstrating project setup, authentication, and making a call to attestors_get_iam_policy, including error handling. ```Rust extern crate hyper; extern crate hyper_rustls; extern crate google_binaryauthorization1 as binaryauthorization1; use binaryauthorization1::{Result, Error}; use std::default::Default; use binaryauthorization1::{BinaryAuthorization, oauth2, hyper, hyper_rustls, chrono, FieldMask}; // Get an ApplicationSecret instance by some means. It contains the `client_id` and // `client_secret`, among other things. let secret: oauth2::ApplicationSecret = Default::default(); // Instantiate the authenticator. It will choose a suitable authentication flow for you, // unless you replace `None` with the desired Flow. // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and // retrieve them from storage. let auth = oauth2::InstalledFlowAuthenticator::builder( secret, oauth2::InstalledFlowReturnMethod::HTTPRedirect, ).build().await.unwrap(); let mut hub = BinaryAuthorization::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_or_http().enable_http1().build()), auth); // You can configure optional parameters by calling the respective setters at will, and // execute the final call using `doit()`. // Values shown here are possibly random and not representative ! let result = hub.projects().attestors_get_iam_policy("resource") .options_requested_policy_version(-33) .doit().await; match result { Err(e) => match e { // The Error enum provides details about what exactly happened. // You can also just use its `Debug`, `Display` or `Error` traits Error::HttpError(_) |Error::Io(_) |Error::MissingAPIKey |Error::MissingToken(_) |Error::Cancelled |Error::UploadSizeLimitExceeded(_, _) |Error::Failure(_) |Error::BadRequest(_) |Error::FieldClash(_) |Error::JsonDecodeError(_, _) => println!("{}", e), }, Ok(res) => println!("Success: {:?}", res), } ``` -------------------------------- ### Complete Example with Authentication and API Call Source: https://github.com/byron/google-apis-rs/blob/main/gen/dns2/README.md A full example demonstrating project setup, authentication, making an API call to list managed zones, and handling the result. ```Rust extern crate hyper; extern crate hyper_rustls; extern crate google_dns2 as dns2; use dns2::{ Result, Error }; use dns2::{ Dns, FieldMask, hyper_rustls, hyper_util, yup_oauth2 }; // Get an ApplicationSecret instance by some means. It contains the `client_id` and // `client_secret`, among other things. let secret: yup_oauth2::ApplicationSecret = Default::default(); // Instantiate the authenticator. It will choose a suitable authentication flow for you, // unless you replace `None` with the desired Flow. // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and // retrieve them from storage. let connector = hyper_rustls::HttpsConnectorBuilder::new() .with_native_roots() .unwrap() .https_only() .enable_http2() .build(); let executor = hyper_util::rt::TokioExecutor::new(); let auth = yup_oauth2::InstalledFlowAuthenticator::with_client( secret, yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect, yup_oauth2::client::CustomHyperClientBuilder::from( hyper_util::client::legacy::Client::builder(executor).build(connector), ), ).build().await.unwrap(); let client = hyper_util::client::legacy::Client::builder( hyper_util::rt::TokioExecutor::new() ) .build( hyper_rustls::HttpsConnectorBuilder::new() .with_native_roots() .unwrap() .https_or_http() .enable_http2() .build() ); let mut hub = Dns::new(client, auth); // You can configure optional parameters by calling the respective setters at will, and // execute the final call using `doit()`. // Values shown here are possibly random and not representative ! let result = hub.managed_zones().list("project", "location") .page_token("no") .max_results(-55) .dns_name("voluptua.") .doit().await; match result { Err(e) => match e { // The Error enum provides details about what exactly happened. // You can also just use its `Debug`, `Display` or `Error` traits Error::HttpError(_) |Error::Io(_) |Error::MissingAPIKey |Error::MissingToken(_) |Error::Cancelled |Error::UploadSizeLimitExceeded(_, _) |Error::Failure(_) |Error::BadRequest(_) |Error::FieldClash(_) |Error::JsonDecodeError(_, _) => println!("{}", e), }, Ok(res) => println!("Success: {:?}", res), } ``` -------------------------------- ### Complete Example: Authenticating and Calling Applications.get Source: https://github.com/byron/google-apis-rs/blob/main/gen/games1/README.md A full Rust example demonstrating project setup, authentication using `InstalledFlowAuthenticator`, client creation, and making a call to the `applications().get` method. It includes error handling for the API response. ```rust extern crate hyper; extern crate hyper_rustls; extern crate google_games1 as games1; use games1::{Result, Error}; use games1::{Games, FieldMask, hyper_rustls, hyper_util, yup_oauth2}; // Get an ApplicationSecret instance by some means. It contains the `client_id` and // `client_secret`, among other things. let secret: yup_oauth2::ApplicationSecret = Default::default(); // Instantiate the authenticator. It will choose a suitable authentication flow for you, // unless you replace `None` with the desired Flow. // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and // retrieve them from storage. let connector = hyper_rustls::HttpsConnectorBuilder::new() .with_native_roots() .unwrap() .https_only() .enable_http2() .build(); let executor = hyper_util::rt::TokioExecutor::new(); let auth = yup_oauth2::InstalledFlowAuthenticator::with_client( secret, yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect, yup_oauth2::client::CustomHyperClientBuilder::from( hyper_util::client::legacy::Client::builder(executor).build(connector), ), ).build().await.unwrap(); let client = hyper_util::client::legacy::Client::builder( hyper_util::rt::TokioExecutor::new() ) .build( hyper_rustls::HttpsConnectorBuilder::new() .with_native_roots() .unwrap() .https_or_http() .enable_http2() .build() ); let mut hub = Games::new(client, auth); // You can configure optional parameters by calling the respective setters at will, and // execute the final call using `doit()`. // Values shown here are possibly random and not representative ! let result = hub.applications().get("applicationId") .platform_type("magna") .language("no") .doit().await; match result { Err(e) => match e { // The Error enum provides details about what exactly happened. // You can also just use its `Debug`, `Display` or `Error` traits Error::HttpError(_) |Error::Io(_) |Error::MissingAPIKey |Error::MissingToken(_) |Error::Cancelled |Error::UploadSizeLimitExceeded(_, _) |Error::Failure(_) |Error::BadRequest(_) |Error::FieldClash(_) |Error::JsonDecodeError(_, _) => println!("{}", e), }, Ok(res) => println!("Success: {:?}", res), } ``` -------------------------------- ### Get Reasoning Engines Examples Operation Source: https://github.com/byron/google-apis-rs/blob/main/gen/aiplatform1/README.md Retrieves a long-running operation for reasoning engine examples. Use this to monitor the status of example management. ```rust let r = hub.reasoning_engines().examples_operations_get(...).doit().await ``` -------------------------------- ### Get Google Slides Presentation Source: https://github.com/byron/google-apis-rs/blob/main/gen/slides1/README.md Specific example for retrieving a presentation using the `get` method. ```Rust let r = hub.presentations().get(...).doit().await ``` -------------------------------- ### Complete OS Login API Example in Rust Source: https://github.com/byron/google-apis-rs/blob/main/gen/oslogin1/README.md This snippet shows how to set up the OS Login client, authenticate with Google, and import an SSH public key. It includes detailed setup for the authenticator and client, and demonstrates error handling for the API call. Ensure you have the necessary dependencies and OAuth2 credentials configured. ```Rust extern crate hyper; extern crate hyper_rustls; extern crate google_oslogin1 as oslogin1; use oslogin1::api::SshPublicKey; use oslogin1::{Result, Error}; use oslogin1::{CloudOSLogin, FieldMask, hyper_rustls, hyper_util, yup_oauth2}; // Get an ApplicationSecret instance by some means. It contains the `client_id` and // `client_secret`, among other things. let secret: yup_oauth2::ApplicationSecret = Default::default(); // Instantiate the authenticator. It will choose a suitable authentication flow for you, // unless you replace `None` with the desired Flow. // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and // retrieve them from storage. let connector = hyper_rustls::HttpsConnectorBuilder::new() .with_native_roots() .unwrap() .https_only() .enable_http2() .build(); let executor = hyper_util::rt::TokioExecutor::new(); let auth = yup_oauth2::InstalledFlowAuthenticator::with_client( secret, yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect, yup_oauth2::client::CustomHyperClientBuilder::from( hyper_util::client::legacy::Client::builder(executor).build(connector), ), ).build().await.unwrap(); let client = hyper_util::client::legacy::Client::builder( hyper_util::rt::TokioExecutor::new() ) .build( hyper_rustls::HttpsConnectorBuilder::new() .with_native_roots() .unwrap() .https_or_http() .enable_http2() .build() ); let mut hub = CloudOSLogin::new(client, auth); // As the method needs a request, you would usually fill it with the desired information // into the respective structure. Some of the parts shown here might not be applicable ! // Values shown here are possibly random and not representative ! let mut req = SshPublicKey::default(); // You can configure optional parameters by calling the respective setters at will, and // execute the final call using `doit()`. // Values shown here are possibly random and not representative ! let result = hub.users().import_ssh_public_key(req, "parent") .add_regions("magna") .project_id("no") .doit().await; match result { Err(e) => match e { // The Error enum provides details about what exactly happened. // You can also just use its `Debug`, `Display` or `Error` traits Error::HttpError(_) |Error::Io(_) |Error::MissingAPIKey |Error::MissingToken(_) |Error::Cancelled |Error::UploadSizeLimitExceeded(_, _) |Error::Failure(_) |Error::BadRequest(_) |Error::FieldClash(_) |Error::JsonDecodeError(_, _) => println!("{}", e), }, Ok(res) => println!("Success: {:?}", res), } ``` -------------------------------- ### Reasoning Engine Example Operations Get Source: https://github.com/byron/google-apis-rs/blob/main/gen/aiplatform1/README.md Retrieves details of an operation related to reasoning engine examples. ```APIDOC ## Reasoning Engine Example Operations Get ### Description Retrieves the status and details of a long-running operation for reasoning engine examples. ### Method GET ### Endpoint `/v1beta1/reasoningEngines/{engineId}/examples/operations/{operationId}` ``` -------------------------------- ### Complete Google Slides API Example in Rust Source: https://github.com/byron/google-apis-rs/blob/main/gen/slides1/README.md This snippet shows how to authenticate, build a client, and make a request to get a page thumbnail from Google Slides. It includes setup for hyper, hyper-rustls, and yup-oauth2 for networking and authentication. Ensure you have valid credentials and replace placeholders like 'presentationId' and 'pageObjectId'. ```Rust extern crate hyper; extern crate hyper_rustls; extern crate google_slides1 as slides1; use slides1::{Result, Error}; use slides1::{Slides, FieldMask, hyper_rustls, hyper_util, yup_oauth2}; // Get an ApplicationSecret instance by some means. It contains the `client_id` and // `client_secret`, among other things. let secret: yup_oauth2::ApplicationSecret = Default::default(); // Instantiate the authenticator. It will choose a suitable authentication flow for you, // unless you replace `None` with the desired Flow. // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and // retrieve them from storage. let connector = hyper_rustls::HttpsConnectorBuilder::new() .with_native_roots() .unwrap() .https_only() .enable_http2() .build(); let executor = hyper_util::rt::TokioExecutor::new(); let auth = yup_oauth2::InstalledFlowAuthenticator::with_client( secret, yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect, yup_oauth2::client::CustomHyperClientBuilder::from( hyper_util::client::legacy::Client::builder(executor).build(connector), ), ).build().await.unwrap(); let client = hyper_util::client::legacy::Client::builder( hyper_util::rt::TokioExecutor::new() ) .build( hyper_rustls::HttpsConnectorBuilder::new() .with_native_roots() .unwrap() .https_or_http() .enable_http2() .build() ); let mut hub = Slides::new(client, auth); // You can configure optional parameters by calling the respective setters at will, and // execute the final call using `doit()`. // Values shown here are possibly random and not representative ! let result = hub.presentations().pages_get_thumbnail("presentationId", "pageObjectId") .thumbnail_properties_thumbnail_size("no") .thumbnail_properties_mime_type("ipsum") .doit().await; match result { Err(e) => match e { // The Error enum provides details about what exactly happened. // You can also just use its `Debug`, `Display` or `Error` traits Error::HttpError(_) |Error::Io(_) |Error::MissingAPIKey |Error::MissingToken(_) |Error::Cancelled |Error::UploadSizeLimitExceeded(_, _) |Error::Failure(_) |Error::BadRequest(_) |Error::FieldClash(_) |Error::JsonDecodeError(_, _) => println!("{}", e), }, Ok(res) => println!("Success: {:?}", res), } ``` -------------------------------- ### Complete Example: Create AuthzExtension Source: https://github.com/byron/google-apis-rs/blob/main/gen/networkservices1/README.md This example demonstrates setting up the client, authenticating, and making a call to create an AuthzExtension using the google-networkservices1 library. Ensure you have a valid ApplicationSecret and handle the Result. ```rust extern crate hyper; extern crate hyper_rustls; extern crate google_networkservices1 as networkservices1; use networkservices1::api::AuthzExtension; use networkservices1::{Result, Error}; use networkservices1::{NetworkServices, FieldMask, hyper_rustls, hyper_util, yup_oauth2}; // Get an ApplicationSecret instance by some means. It contains the `client_id` and // `client_secret`, among other things. let secret: yup_oauth2::ApplicationSecret = Default::default(); // Instantiate the authenticator. It will choose a suitable authentication flow for you, // unless you replace `None` with the desired Flow. // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and // retrieve them from storage. let connector = hyper_rustls::HttpsConnectorBuilder::new() .with_native_roots() .unwrap() .https_only() .enable_http2() .build(); let executor = hyper_util::rt::TokioExecutor::new(); let auth = yup_oauth2::InstalledFlowAuthenticator::with_client( secret, yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect, yup_oauth2::client::CustomHyperClientBuilder::from( hyper_util::client::legacy::Client::builder(executor).build(connector), ), ).build().await.unwrap(); let client = hyper_util::client::legacy::Client::builder( hyper_util::rt::TokioExecutor::new() ) .build( hyper_rustls::HttpsConnectorBuilder::new() .with_native_roots() .unwrap() .https_or_http() .enable_http2() .build() ); let mut hub = NetworkServices::new(client, auth); // As the method needs a request, you would usually fill it with the desired information // into the respective structure. Some of the parts shown here might not be applicable ! // Values shown here are possibly random and not representative ! let mut req = AuthzExtension::default(); // You can configure optional parameters by calling the respective setters at will, and // execute the final call using `doit()`. // Values shown here are possibly random and not representative ! let result = hub.projects().locations_authz_extensions_create(req, "parent") .request_id("magna") .authz_extension_id("no") .doit().await; match result { Err(e) => match e { // The Error enum provides details about what exactly happened. // You can also just use its `Debug`, `Display` or `Error` traits Error::HttpError(_) |Error::Io(_) |Error::MissingAPIKey |Error::MissingToken(_) |Error::Cancelled |Error::UploadSizeLimitExceeded(_, _) |Error::Failure(_) |Error::BadRequest(_) |Error::FieldClash(_) |Error::JsonDecodeError(_, _) => println!("{}", e), }, Ok(res) => println!("Success: {:?}", res), } ``` -------------------------------- ### Get Reasoning Engines Examples Operation Source: https://github.com/byron/google-apis-rs/blob/main/gen/aiplatform1/README.md Fetches the status of an operation concerning examples within a Reasoning Engine. ```rust let r = hub.projects().locations_reasoning_engines_examples_operations_get(...).doit().await ``` -------------------------------- ### Complete Datastore Index Creation Example Source: https://github.com/byron/google-apis-rs/blob/main/gen/datastore1/README.md This example demonstrates how to set up authentication, build a Datastore client, and create a new index for a Google Cloud Datastore project. Ensure you have a valid `ApplicationSecret` and handle potential errors during the operation. ```Rust extern crate hyper; extern crate hyper_rustls; extern crate google_datastore1 as datastore1; use datastore1::api::GoogleDatastoreAdminV1Index; use datastore1::{Result, Error}; use datastore1::{Datastore, FieldMask, hyper_rustls, hyper_util, yup_oauth2}; // Get an ApplicationSecret instance by some means. It contains the `client_id` and // `client_secret`, among other things. let secret: yup_oauth2::ApplicationSecret = Default::default(); // Instantiate the authenticator. It will choose a suitable authentication flow for you, // unless you replace `None` with the desired Flow. // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and // retrieve them from storage. let connector = hyper_rustls::HttpsConnectorBuilder::new() .with_native_roots() .unwrap() .https_only() .enable_http2() .build(); let executor = hyper_util::rt::TokioExecutor::new(); let auth = yup_oauth2::InstalledFlowAuthenticator::with_client( secret, yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect, yup_oauth2::client::CustomHyperClientBuilder::from( hyper_util::client::legacy::Client::builder(executor).build(connector), ), ).build().await.unwrap(); let client = hyper_util::client::legacy::Client::builder( hyper_util::rt::TokioExecutor::new() ) .build( hyper_rustls::HttpsConnectorBuilder::new() .with_native_roots() .unwrap() .https_or_http() .enable_http2() .build() ); let mut hub = Datastore::new(client, auth); // As the method needs a request, you would usually fill it with the desired information // into the respective structure. Some of the parts shown here might not be applicable ! // Values shown here are possibly random and not representative ! let mut req = GoogleDatastoreAdminV1Index::default(); // You can configure optional parameters by calling the respective setters at will, and // execute the final call using `doit()`. // Values shown here are possibly random and not representative ! let result = hub.projects().indexes_create(req, "projectId") .doit().await; match result { Err(e) => match e { // The Error enum provides details about what exactly happened. // You can also just use its `Debug`, `Display` or `Error` traits Error::HttpError(_) |Error::Io(_) |Error::MissingAPIKey |Error::MissingToken(_) |Error::Cancelled |Error::UploadSizeLimitExceeded(_, _) |Error::Failure(_) |Error::BadRequest(_) |Error::FieldClash(_) |Error::JsonDecodeError(_, _) => println!("{}", e), }, Ok(res) => println!("Success: {:?}", res), } ``` -------------------------------- ### Example Store Operations API Source: https://github.com/byron/google-apis-rs/blob/main/gen/aiplatform1/README.md Provides endpoints for managing operations related to Example Stores, including cancel, delete, get, list, and wait. ```APIDOC ## Example Store Operations API ### Description Manages operations for Example Stores. ### Method GET, POST, DELETE, PUT ### Endpoint /v1beta1/projects/{projectId}/locations/{locationId}/exampleStores/{exampleStoreId}/operations/{operationId} ### Parameters #### Path Parameters - **projectId** (string) - Required - The project ID. - **locationId** (string) - Required - The location ID. - **exampleStoreId** (string) - Required - The ID of the example store. - **operationId** (string) - Required - The ID of the operation. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **name** (string) - The name of the operation. - **done** (boolean) - Indicates if the operation is complete. - **error** (object) - Details of any error that occurred. - **response** (object) - The response of the operation. #### Response Example { "name": "operations/abcde", "done": true, "response": {} } ``` -------------------------------- ### Complete Blogger API Example in Rust Source: https://github.com/byron/google-apis-rs/blob/main/gen/blogger3/README.md This example shows how to initialize the Blogger client, authenticate using InstalledFlowAuthenticator, and make a request to list blog posts with various optional parameters. It includes basic error handling for API responses. ```Rust extern crate hyper; extern crate hyper_rustls; extern crate google_blogger3 as blogger3; use blogger3::{Result, Error}; use blogger3::{Blogger, FieldMask, hyper_rustls, hyper_util, yup_oauth2}; // Get an ApplicationSecret instance by some means. It contains the `client_id` and // `client_secret`, among other things. let secret: yup_oauth2::ApplicationSecret = Default::default(); // Instantiate the authenticator. It will choose a suitable authentication flow for you, // unless you replace `None` with the desired Flow. // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and // retrieve them from storage. let connector = hyper_rustls::HttpsConnectorBuilder::new() .with_native_roots() .unwrap() .https_only() .enable_http2() .build(); let executor = hyper_util::rt::TokioExecutor::new(); let auth = yup_oauth2::InstalledFlowAuthenticator::with_client( secret, yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect, yup_oauth2::client::CustomHyperClientBuilder::from( hyper_util::client::legacy::Client::builder(executor).build(connector), ), ).build().await.unwrap(); let client = hyper_util::client::legacy::Client::builder( hyper_util::rt::TokioExecutor::new() ) .build( hyper_rustls::HttpsConnectorBuilder::new() .with_native_roots() .unwrap() .https_or_http() .enable_http2() .build() ); let mut hub = Blogger::new(client, auth); // You can configure optional parameters by calling the respective setters at will, and // execute the final call using `doit()`. // Values shown here are possibly random and not representative ! let result = hub.posts().list("blogId") .view("magna") .add_status("no") .start_date("ipsum") .sort_option("voluptua.") .page_token("At") .order_by("sanctus") .max_results(21) .labels("amet.") .fetch_images(true) .fetch_bodies(true) .end_date("duo") .doit().await; match result { Err(e) => match e { // The Error enum provides details about what exactly happened. // You can also just use its `Debug`, `Display` or `Error` traits Error::HttpError(_) |Error::Io(_) |Error::MissingAPIKey |Error::MissingToken(_) |Error::Cancelled |Error::UploadSizeLimitExceeded(_, _) |Error::Failure(_) |Error::BadRequest(_) |Error::FieldClash(_) |Error::JsonDecodeError(_, _) => println!("{}", e), }, Ok(res) => println!("Success: {:?}", res), } ``` -------------------------------- ### Library Setup and Usage Source: https://github.com/byron/google-apis-rs/blob/main/gen/authorizedbuyersmarketplace1/README.md Instructions on how to set up the Rust project and general usage patterns for the API client. ```APIDOC # Structure of this Library The API is structured into the following primary items: * **[Hub](https://docs.rs/google-authorizedbuyersmarketplace1/7.0.0+20251211/google_authorizedbuyersmarketplace1/AuthorizedBuyersMarketplace)** * a central object to maintain state and allow accessing all *Activities* * creates [*Method Builders*](https://docs.rs/google-authorizedbuyersmarketplace1/7.0.0+20251211/google_authorizedbuyersmarketplace1/common::MethodsBuilder) which in turn allow access to individual [*Call Builders*](https://docs.rs/google-authorizedbuyersmarketplace1/7.0.0+20251211/google_authorizedbuyersmarketplace1/common::CallBuilder) * **[Resources](https://docs.rs/google-authorizedbuyersmarketplace1/7.0.0+20251211/google_authorizedbuyersmarketplace1/common::Resource)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* * **[Parts](https://docs.rs/google-authorizedbuyersmarketplace1/7.0.0+20251211/google_authorizedbuyersmarketplace1/common::Part)** * a collection of properties * never directly used in *Activities* * **[Activities](https://docs.rs/google-authorizedbuyersmarketplace1/7.0.0+20251211/google_authorizedbuyersmarketplace1/common::CallBuilder)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. Generally speaking, you can invoke *Activities* like this: ```Rust,ignore let r = hub.resource().activity(...).doit().await ``` Or specifically ... ```ignore let r = hub.buyers().proposals_accept(...).doit().await let r = hub.buyers().proposals_add_note(...).doit().await let r = hub.buyers().proposals_cancel_negotiation(...).doit().await let r = hub.buyers().proposals_get(...).doit().await let r = hub.buyers().proposals_patch(...).doit().await let r = hub.buyers().proposals_send_rfp(...).doit().await ``` The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities` supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be specified right away (i.e. `(...)`), whereas all optional ones can be [build up][builder-pattern] as desired. The `doit()` method performs the actual communication with the server and returns the respective result. ## Setting up your Project To use this library, you would put the following lines into your `Cargo.toml` file: ```toml [dependencies] google-authorizedbuyersmarketplace1 = "*" serde = "1" serde_json = "1" ``` ``` -------------------------------- ### Set IAM Policy Invocation Example Source: https://github.com/byron/google-apis-rs/blob/main/gen/gameservices1/README.md This example shows how to invoke the `locations_game_server_deployments_set_iam_policy` activity. Similar to other activities, it uses the builder pattern starting from the hub. ```Rust let r = hub.projects().locations_game_server_deployments_set_iam_policy(...).doit().await ``` -------------------------------- ### Start TPU Node Source: https://github.com/byron/google-apis-rs/blob/main/gen/tpu1/README.md Example of starting a TPU node within a project's location. This specific call requires all necessary parameters to be provided upfront. ```Rust let r = hub.projects().locations_nodes_start(...).doit().await ``` -------------------------------- ### Complete Example: Listing Version History Releases Source: https://github.com/byron/google-apis-rs/blob/main/gen/versionhistory1/README.md This example demonstrates a full workflow, including setting up authentication, building a client, and making an API call to list version history releases. It also shows how to handle various error types returned by the API. ```Rust extern crate hyper; extern crate hyper_rustls; extern crate google_versionhistory1 as versionhistory1; use versionhistory1::{Result, Error}; use versionhistory1::{VersionHistory, FieldMask, hyper_rustls, hyper_util, yup_oauth2}; // Get an ApplicationSecret instance by some means. It contains the `client_id` and // `client_secret`, among other things. let secret: yup_oauth2::ApplicationSecret = Default::default(); // Instantiate the authenticator. It will choose a suitable authentication flow for you, // unless you replace `None` with the desired Flow. // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and // retrieve them from storage. let connector = hyper_rustls::HttpsConnectorBuilder::new() .with_native_roots() .unwrap() .https_only() .enable_http2() .build(); let executor = hyper_util::rt::TokioExecutor::new(); let auth = yup_oauth2::InstalledFlowAuthenticator::with_client( secret, yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect, yup_oauth2::client::CustomHyperClientBuilder::from( hyper_util::client::legacy::Client::builder(executor).build(connector), ), ).build().await.unwrap(); let client = hyper_util::client::legacy::Client::builder( hyper_util::rt::TokioExecutor::new() ) .build( hyper_rustls::HttpsConnectorBuilder::new() .with_native_roots() .unwrap() .https_or_http() .enable_http2() .build() ); let mut hub = VersionHistory::new(client, auth); // You can configure optional parameters by calling the respective setters at will, and // execute the final call using `doit()`. // Values shown here are possibly random and not representative ! let result = hub.platforms().channels_versions_releases_list("parent") .page_token("magna") .page_size(-11) .order_by("ipsum") .filter("voluptua.") .doit().await; match result { Err(e) => match e { // The Error enum provides details about what exactly happened. // You can also just use its `Debug`, `Display` or `Error` traits Error::HttpError(_) |Error::Io(_) |Error::MissingAPIKey |Error::MissingToken(_) |Error::Cancelled |Error::UploadSizeLimitExceeded(_, _) |Error::Failure(_) |Error::BadRequest(_) |Error::FieldClash(_) |Error::JsonDecodeError(_, _) => println!("{}", e), }, Ok(res) => println!("Success: {:?}", res), } ``` -------------------------------- ### Complete Example: Creating an Identity Aware Proxy Client Source: https://github.com/byron/google-apis-rs/blob/main/gen/iap1/README.md A full example demonstrating project setup, authentication, and making a call to create an Identity Aware Proxy Client. Ensure you have a valid ApplicationSecret instance and handle potential errors. ```Rust extern crate hyper; extern crate hyper_rustls; extern crate google_iap1 as iap1; use iap1::api::IdentityAwareProxyClient; use iap1::{Result, Error}; use iap1::{CloudIAP, FieldMask, hyper_rustls, hyper_util, yup_oauth2}; // Get an ApplicationSecret instance by some means. It contains the `client_id` and // `client_secret`, among other things. let secret: yup_oauth2::ApplicationSecret = Default::default(); // Instantiate the authenticator. It will choose a suitable authentication flow for you, // unless you replace `None` with the desired Flow. // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and // retrieve them from storage. let connector = hyper_rustls::HttpsConnectorBuilder::new() .with_native_roots() .unwrap() .https_only() .enable_http2() .build(); let executor = hyper_util::rt::TokioExecutor::new(); let auth = yup_oauth2::InstalledFlowAuthenticator::with_client( secret, yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect, yup_oauth2::client::CustomHyperClientBuilder::from( hyper_util::client::legacy::Client::builder(executor).build(connector), ), ).build().await.unwrap(); let client = hyper_util::client::legacy::Client::builder( hyper_util::rt::TokioExecutor::new() ) .build( hyper_rustls::HttpsConnectorBuilder::new() .with_native_roots() .unwrap() .https_or_http() .enable_http2() .build() ); let mut hub = CloudIAP::new(client, auth); // As the method needs a request, you would usually fill it with the desired information // into the respective structure. Some of the parts shown here might not be applicable ! // Values shown here are possibly random and not representative ! let mut req = IdentityAwareProxyClient::default(); // You can configure optional parameters by calling the respective setters at will, and // execute the final call using `doit()`. // Values shown here are possibly random and not representative ! let result = hub.projects().brands_identity_aware_proxy_clients_create(req, "parent") .doit().await; match result { Err(e) => match e { // The Error enum provides details about what exactly happened. // You can also just use its `Debug`, `Display` or `Error` traits Error::HttpError(_) |Error::Io(_) |Error::MissingAPIKey |Error::MissingToken(_) |Error::Cancelled |Error::UploadSizeLimitExceeded(_, _) |Error::Failure(_) |Error::BadRequest(_) |Error::FieldClash(_) |Error::JsonDecodeError(_, _) => println!("{}", e), }, Ok(res) => println!("Success: {:?}", res), } ``` -------------------------------- ### Complete Google API Example in Rust Source: https://github.com/byron/google-apis-rs/blob/main/gen/plusdomains1/README.md This snippet shows a full example of setting up a Google API client, authenticating, making a request, and handling the response. It requires `hyper`, `hyper-rustls`, `google-plusdomains1`, and `yup-oauth2` crates. Ensure you have a valid `ApplicationSecret` and configure the authenticator appropriately. ```Rust extern crate hyper; extern crate hyper_rustls; extern crate google_plusdomains1 as plusdomains1; use plusdomains1::{Result, Error}; use plusdomains1::{PlusDomains, FieldMask, hyper_rustls, hyper_util, yup_oauth2}; // Get an ApplicationSecret instance by some means. It contains the `client_id` and // `client_secret`, among other things. let secret: yup_oauth2::ApplicationSecret = Default::default(); // Instantiate the authenticator. It will choose a suitable authentication flow for you, // unless you replace `None` with the desired Flow. // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and // retrieve them from storage. let connector = hyper_rustls::HttpsConnectorBuilder::new() .with_native_roots() .unwrap() .https_only() .enable_http2() .build(); let executor = hyper_util::rt::TokioExecutor::new(); let auth = yup_oauth2::InstalledFlowAuthenticator::with_client( secret, yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect, yup_oauth2::client::CustomHyperClientBuilder::from( hyper_util::client::legacy::Client::builder(executor).build(connector), ), ).build().await.unwrap(); let client = hyper_util::client::legacy::Client::builder( hyper_util::rt::TokioExecutor::new() ) .build( hyper_rustls::HttpsConnectorBuilder::new() .with_native_roots() .unwrap() .https_or_http() .enable_http2() .build() ); let mut hub = PlusDomains::new(client, auth); // You can configure optional parameters by calling the respective setters at will, and // execute the final call using `doit()`. // Values shown here are possibly random and not representative ! let result = hub.comments().list("activityId") .sort_order("magna") .page_token("no") .max_results(46) .doit().await; match result { Err(e) => match e { // The Error enum provides details about what exactly happened. // You can also just use its `Debug`, `Display` or `Error` traits Error::HttpError(_) |Error::Io(_) |Error::MissingAPIKey |Error::MissingToken(_) |Error::Cancelled |Error::UploadSizeLimitExceeded(_, _) |Error::Failure(_) |Error::BadRequest(_) |Error::FieldClash(_) |Error::JsonDecodeError(_, _) => println!("{}", e), }, Ok(res) => println!("Success: {:?}", res), } ``` -------------------------------- ### Complete Google Domains RDAP API Example in Rust Source: https://github.com/byron/google-apis-rs/blob/main/gen/domainsrdap1/README.md This snippet shows the full setup for using the google-domainsrdap1 crate. It includes initializing the client, setting up authentication with ApplicationSecret and InstalledFlowAuthenticator, building the HTTP client with hyper-rustls, and making a sample API call to get IP information. Error handling for various API response types is also demonstrated. ```Rust extern crate hyper; extern crate hyper_rustls; extern crate google_domainsrdap1 as domainsrdap1; use domainsrdap1::{Result, Error}; use domainsrdap1::{DomainsRDAP, FieldMask, hyper_rustls, hyper_util, yup_oauth2}; // Get an ApplicationSecret instance by some means. It contains the `client_id` and // `client_secret`, among other things. let secret: yup_oauth2::ApplicationSecret = Default::default(); // Instantiate the authenticator. It will choose a suitable authentication flow for you, // unless you replace `None` with the desired Flow. // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and // retrieve them from storage. let connector = hyper_rustls::HttpsConnectorBuilder::new() .with_native_roots() .unwrap() .https_only() .enable_http2() .build(); let executor = hyper_util::rt::TokioExecutor::new(); let auth = yup_oauth2::InstalledFlowAuthenticator::with_client( secret, yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect, yup_oauth2::client::CustomHyperClientBuilder::from( hyper_util::client::legacy::Client::builder(executor).build(connector), ), ).build().await.unwrap(); let client = hyper_util::client::legacy::Client::builder( hyper_util::rt::TokioExecutor::new() ) .build( hyper_rustls::HttpsConnectorBuilder::new() .with_native_roots() .unwrap() .https_or_http() .enable_http2() .build() ); let mut hub = DomainsRDAP::new(client, auth); // You can configure optional parameters by calling the respective setters at will, and // execute the final call using `doit()`. // Values shown here are possibly random and not representative ! let result = hub.ip().get("ipId", "ipId1") .doit().await; match result { Err(e) => match e { // The Error enum provides details about what exactly happened. // You can also just use its `Debug`, `Display` or `Error` traits Error::HttpError(_) |Error::Io(_) |Error::MissingAPIKey |Error::MissingToken(_) |Error::Cancelled |Error::UploadSizeLimitExceeded(_, _) |Error::Failure(_) |Error::BadRequest(_) |Error::FieldClash(_) |Error::JsonDecodeError(_, _) => println!("{}", e), }, Ok(res) => println!("Success: {:?}", res), } ``` -------------------------------- ### Specific Project Policy Operations Source: https://github.com/byron/google-apis-rs/blob/main/gen/orgpolicy2/README.md Examples of creating, getting, getting effective policies, and patching policies for projects using the library. These methods require specific arguments to be provided. ```Rust let r = hub.projects().policies_create(...).doit().await ``` ```Rust let r = hub.projects().policies_get(...).doit().await ``` ```Rust let r = hub.projects().policies_get_effective_policy(...).doit().await ``` ```Rust let r = hub.projects().policies_patch(...).doit().await ```