@@ -1641,6 +1641,42 @@ pub mod managed_zones {
16411641 . map ( gax:: response:: Response :: into_body)
16421642 }
16431643
1644+ /// Creates a [Poller][lro::Poller] to work with `patch`.
1645+ pub fn poller ( self ) -> impl lro:: Poller < crate :: model:: Operation , crate :: model:: Operation > {
1646+ let polling_error_policy = self . 0 . stub . get_polling_error_policy ( & self . 0 . options ) ;
1647+ let polling_backoff_policy = self . 0 . stub . get_polling_backoff_policy ( & self . 0 . options ) ;
1648+
1649+ let stub = self . 0 . stub . clone ( ) ;
1650+ let mut options = self . 0 . options . clone ( ) ;
1651+ options. set_retry_policy ( gax:: retry_policy:: NeverRetry ) ;
1652+ let project = self . 0 . request . project . clone ( ) ;
1653+ let managed_zone = self . 0 . request . managed_zone . clone ( ) ;
1654+ let query = move |name| {
1655+ let stub = stub. clone ( ) ;
1656+ let options = options. clone ( ) ;
1657+ let project = project. clone ( ) ;
1658+ let managed_zone = managed_zone. clone ( ) ;
1659+ async {
1660+ GetOperation :: new ( stub)
1661+ . set_project ( project)
1662+ . set_managed_zone ( managed_zone)
1663+ . set_operation ( name)
1664+ . with_options ( options)
1665+ . send ( )
1666+ . await
1667+ }
1668+ } ;
1669+
1670+ let start = move || async { self . send ( ) . await } ;
1671+
1672+ lro:: internal:: new_discovery_poller (
1673+ polling_error_policy,
1674+ polling_backoff_policy,
1675+ start,
1676+ query,
1677+ )
1678+ }
1679+
16441680 /// Sets the value of [client_operation_id][crate::model::managed_zones::PatchRequest::client_operation_id].
16451681 pub fn set_client_operation_id < T > ( mut self , v : T ) -> Self
16461682 where
@@ -1910,6 +1946,42 @@ pub mod managed_zones {
19101946 . map ( gax:: response:: Response :: into_body)
19111947 }
19121948
1949+ /// Creates a [Poller][lro::Poller] to work with `update`.
1950+ pub fn poller ( self ) -> impl lro:: Poller < crate :: model:: Operation , crate :: model:: Operation > {
1951+ let polling_error_policy = self . 0 . stub . get_polling_error_policy ( & self . 0 . options ) ;
1952+ let polling_backoff_policy = self . 0 . stub . get_polling_backoff_policy ( & self . 0 . options ) ;
1953+
1954+ let stub = self . 0 . stub . clone ( ) ;
1955+ let mut options = self . 0 . options . clone ( ) ;
1956+ options. set_retry_policy ( gax:: retry_policy:: NeverRetry ) ;
1957+ let project = self . 0 . request . project . clone ( ) ;
1958+ let managed_zone = self . 0 . request . managed_zone . clone ( ) ;
1959+ let query = move |name| {
1960+ let stub = stub. clone ( ) ;
1961+ let options = options. clone ( ) ;
1962+ let project = project. clone ( ) ;
1963+ let managed_zone = managed_zone. clone ( ) ;
1964+ async {
1965+ GetOperation :: new ( stub)
1966+ . set_project ( project)
1967+ . set_managed_zone ( managed_zone)
1968+ . set_operation ( name)
1969+ . with_options ( options)
1970+ . send ( )
1971+ . await
1972+ }
1973+ } ;
1974+
1975+ let start = move || async { self . send ( ) . await } ;
1976+
1977+ lro:: internal:: new_discovery_poller (
1978+ polling_error_policy,
1979+ polling_backoff_policy,
1980+ start,
1981+ query,
1982+ )
1983+ }
1984+
19131985 /// Sets the value of [client_operation_id][crate::model::managed_zones::UpdateRequest::client_operation_id].
19141986 pub fn set_client_operation_id < T > ( mut self , v : T ) -> Self
19151987 where
@@ -1965,6 +2037,99 @@ pub mod managed_zones {
19652037 & mut self . 0 . options
19662038 }
19672039 }
2040+
2041+ /// The request builder for [ManagedZones::get_operation][crate::client::ManagedZones::get_operation] calls.
2042+ ///
2043+ /// # Example
2044+ /// ```
2045+ /// # use google_cloud_dns_v1::builder::managed_zones::GetOperation;
2046+ /// # async fn sample() -> gax::Result<()> {
2047+ ///
2048+ /// let builder = prepare_request_builder();
2049+ /// let response = builder.send().await?;
2050+ /// # Ok(()) }
2051+ ///
2052+ /// fn prepare_request_builder() -> GetOperation {
2053+ /// # panic!();
2054+ /// // ... details omitted ...
2055+ /// }
2056+ /// ```
2057+ #[ derive( Clone , Debug ) ]
2058+ pub struct GetOperation ( RequestBuilder < crate :: model:: managed_zone_operations:: GetRequest > ) ;
2059+
2060+ impl GetOperation {
2061+ pub ( crate ) fn new (
2062+ stub : std:: sync:: Arc < dyn super :: super :: stub:: dynamic:: ManagedZones > ,
2063+ ) -> Self {
2064+ Self ( RequestBuilder :: new ( stub) )
2065+ }
2066+
2067+ /// Sets the full request, replacing any prior values.
2068+ pub fn with_request < V : Into < crate :: model:: managed_zone_operations:: GetRequest > > (
2069+ mut self ,
2070+ v : V ,
2071+ ) -> Self {
2072+ self . 0 . request = v. into ( ) ;
2073+ self
2074+ }
2075+
2076+ /// Sets all the options, replacing any prior values.
2077+ pub fn with_options < V : Into < gax:: options:: RequestOptions > > ( mut self , v : V ) -> Self {
2078+ self . 0 . options = v. into ( ) ;
2079+ self
2080+ }
2081+
2082+ /// Sends the request.
2083+ pub async fn send ( self ) -> Result < crate :: model:: Operation > {
2084+ ( * self . 0 . stub )
2085+ . get_operation ( self . 0 . request , self . 0 . options )
2086+ . await
2087+ . map ( gax:: response:: Response :: into_body)
2088+ }
2089+
2090+ /// Sets the value of [client_operation_id][crate::model::managed_zone_operations::GetRequest::client_operation_id].
2091+ pub fn set_client_operation_id < T > ( mut self , v : T ) -> Self
2092+ where
2093+ T : std:: convert:: Into < std:: string:: String > ,
2094+ {
2095+ self . 0 . request . client_operation_id = std:: option:: Option :: Some ( v. into ( ) ) ;
2096+ self
2097+ }
2098+
2099+ /// Sets or clears the value of [client_operation_id][crate::model::managed_zone_operations::GetRequest::client_operation_id].
2100+ pub fn set_or_clear_client_operation_id < T > ( mut self , v : std:: option:: Option < T > ) -> Self
2101+ where
2102+ T : std:: convert:: Into < std:: string:: String > ,
2103+ {
2104+ self . 0 . request . client_operation_id = v. map ( |x| x. into ( ) ) ;
2105+ self
2106+ }
2107+
2108+ /// Sets the value of [managed_zone][crate::model::managed_zone_operations::GetRequest::managed_zone].
2109+ pub fn set_managed_zone < T : Into < std:: string:: String > > ( mut self , v : T ) -> Self {
2110+ self . 0 . request . managed_zone = v. into ( ) ;
2111+ self
2112+ }
2113+
2114+ /// Sets the value of [operation][crate::model::managed_zone_operations::GetRequest::operation].
2115+ pub fn set_operation < T : Into < std:: string:: String > > ( mut self , v : T ) -> Self {
2116+ self . 0 . request . operation = v. into ( ) ;
2117+ self
2118+ }
2119+
2120+ /// Sets the value of [project][crate::model::managed_zone_operations::GetRequest::project].
2121+ pub fn set_project < T : Into < std:: string:: String > > ( mut self , v : T ) -> Self {
2122+ self . 0 . request . project = v. into ( ) ;
2123+ self
2124+ }
2125+ }
2126+
2127+ #[ doc( hidden) ]
2128+ impl gax:: options:: internal:: RequestBuilder for GetOperation {
2129+ fn request_options ( & mut self ) -> & mut gax:: options:: RequestOptions {
2130+ & mut self . 0 . options
2131+ }
2132+ }
19682133}
19692134
19702135pub mod policies {
0 commit comments