@@ -1518,6 +1518,282 @@ public Operations operations() {
1518
1518
*/
1519
1519
public class Operations {
1520
1520
1521
+ /**
1522
+ * Starts asynchronous cancellation on a long-running operation. The server makes a best effort to
1523
+ * cancel the operation, but success is not guaranteed. If the server doesn't support this method,
1524
+ * it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other
1525
+ * methods to check whether the cancellation succeeded or whether the operation completed despite
1526
+ * cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an
1527
+ * operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to
1528
+ * `Code.CANCELLED`.
1529
+ *
1530
+ * Create a request for the method "operations.cancel".
1531
+ *
1532
+ * This request holds the parameters needed by the cloudasset server. After setting any optional
1533
+ * parameters, call the {@link Cancel#execute()} method to invoke the remote operation.
1534
+ *
1535
+ * @param name The name of the operation resource to be cancelled.
1536
+ * @param content the {@link com.google.api.services.cloudasset.v1.model.CancelOperationRequest}
1537
+ * @return the request
1538
+ */
1539
+ public Cancel cancel (java .lang .String name , com .google .api .services .cloudasset .v1 .model .CancelOperationRequest content ) throws java .io .IOException {
1540
+ Cancel result = new Cancel (name , content );
1541
+ initialize (result );
1542
+ return result ;
1543
+ }
1544
+
1545
+ public class Cancel extends CloudAssetRequest <com .google .api .services .cloudasset .v1 .model .Empty > {
1546
+
1547
+ private static final String REST_PATH = "v1/{+name}:cancel" ;
1548
+
1549
+ private final java .util .regex .Pattern NAME_PATTERN =
1550
+ java .util .regex .Pattern .compile ("^operations/.*$" );
1551
+
1552
+ /**
1553
+ * Starts asynchronous cancellation on a long-running operation. The server makes a best effort to
1554
+ * cancel the operation, but success is not guaranteed. If the server doesn't support this method,
1555
+ * it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other
1556
+ * methods to check whether the cancellation succeeded or whether the operation completed despite
1557
+ * cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an
1558
+ * operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to
1559
+ * `Code.CANCELLED`.
1560
+ *
1561
+ * Create a request for the method "operations.cancel".
1562
+ *
1563
+ * This request holds the parameters needed by the the cloudasset server. After setting any
1564
+ * optional parameters, call the {@link Cancel#execute()} method to invoke the remote operation.
1565
+ * <p> {@link
1566
+ * Cancel#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
1567
+ * be called to initialize this instance immediately after invoking the constructor. </p>
1568
+ *
1569
+ * @param name The name of the operation resource to be cancelled.
1570
+ * @param content the {@link com.google.api.services.cloudasset.v1.model.CancelOperationRequest}
1571
+ * @since 1.13
1572
+ */
1573
+ protected Cancel (java .lang .String name , com .google .api .services .cloudasset .v1 .model .CancelOperationRequest content ) {
1574
+ super (CloudAsset .this , "POST" , REST_PATH , content , com .google .api .services .cloudasset .v1 .model .Empty .class );
1575
+ this .name = com .google .api .client .util .Preconditions .checkNotNull (name , "Required parameter name must be specified." );
1576
+ if (!getSuppressPatternChecks ()) {
1577
+ com .google .api .client .util .Preconditions .checkArgument (NAME_PATTERN .matcher (name ).matches (),
1578
+ "Parameter name must conform to the pattern " +
1579
+ "^operations/.*$" );
1580
+ }
1581
+ }
1582
+
1583
+ @ Override
1584
+ public Cancel set$Xgafv (java .lang .String $Xgafv ) {
1585
+ return (Cancel ) super .set$Xgafv ($Xgafv );
1586
+ }
1587
+
1588
+ @ Override
1589
+ public Cancel setAccessToken (java .lang .String accessToken ) {
1590
+ return (Cancel ) super .setAccessToken (accessToken );
1591
+ }
1592
+
1593
+ @ Override
1594
+ public Cancel setAlt (java .lang .String alt ) {
1595
+ return (Cancel ) super .setAlt (alt );
1596
+ }
1597
+
1598
+ @ Override
1599
+ public Cancel setCallback (java .lang .String callback ) {
1600
+ return (Cancel ) super .setCallback (callback );
1601
+ }
1602
+
1603
+ @ Override
1604
+ public Cancel setFields (java .lang .String fields ) {
1605
+ return (Cancel ) super .setFields (fields );
1606
+ }
1607
+
1608
+ @ Override
1609
+ public Cancel setKey (java .lang .String key ) {
1610
+ return (Cancel ) super .setKey (key );
1611
+ }
1612
+
1613
+ @ Override
1614
+ public Cancel setOauthToken (java .lang .String oauthToken ) {
1615
+ return (Cancel ) super .setOauthToken (oauthToken );
1616
+ }
1617
+
1618
+ @ Override
1619
+ public Cancel setPrettyPrint (java .lang .Boolean prettyPrint ) {
1620
+ return (Cancel ) super .setPrettyPrint (prettyPrint );
1621
+ }
1622
+
1623
+ @ Override
1624
+ public Cancel setQuotaUser (java .lang .String quotaUser ) {
1625
+ return (Cancel ) super .setQuotaUser (quotaUser );
1626
+ }
1627
+
1628
+ @ Override
1629
+ public Cancel setUploadType (java .lang .String uploadType ) {
1630
+ return (Cancel ) super .setUploadType (uploadType );
1631
+ }
1632
+
1633
+ @ Override
1634
+ public Cancel setUploadProtocol (java .lang .String uploadProtocol ) {
1635
+ return (Cancel ) super .setUploadProtocol (uploadProtocol );
1636
+ }
1637
+
1638
+ /** The name of the operation resource to be cancelled. */
1639
+ @ com .google .api .client .util .Key
1640
+ private java .lang .String name ;
1641
+
1642
+ /** The name of the operation resource to be cancelled.
1643
+ */
1644
+ public java .lang .String getName () {
1645
+ return name ;
1646
+ }
1647
+
1648
+ /** The name of the operation resource to be cancelled. */
1649
+ public Cancel setName (java .lang .String name ) {
1650
+ if (!getSuppressPatternChecks ()) {
1651
+ com .google .api .client .util .Preconditions .checkArgument (NAME_PATTERN .matcher (name ).matches (),
1652
+ "Parameter name must conform to the pattern " +
1653
+ "^operations/.*$" );
1654
+ }
1655
+ this .name = name ;
1656
+ return this ;
1657
+ }
1658
+
1659
+ @ Override
1660
+ public Cancel set (String parameterName , Object value ) {
1661
+ return (Cancel ) super .set (parameterName , value );
1662
+ }
1663
+ }
1664
+ /**
1665
+ * Deletes a long-running operation. This method indicates that the client is no longer interested
1666
+ * in the operation result. It does not cancel the operation. If the server doesn't support this
1667
+ * method, it returns `google.rpc.Code.UNIMPLEMENTED`.
1668
+ *
1669
+ * Create a request for the method "operations.delete".
1670
+ *
1671
+ * This request holds the parameters needed by the cloudasset server. After setting any optional
1672
+ * parameters, call the {@link Delete#execute()} method to invoke the remote operation.
1673
+ *
1674
+ * @param name The name of the operation resource to be deleted.
1675
+ * @return the request
1676
+ */
1677
+ public Delete delete (java .lang .String name ) throws java .io .IOException {
1678
+ Delete result = new Delete (name );
1679
+ initialize (result );
1680
+ return result ;
1681
+ }
1682
+
1683
+ public class Delete extends CloudAssetRequest <com .google .api .services .cloudasset .v1 .model .Empty > {
1684
+
1685
+ private static final String REST_PATH = "v1/{+name}" ;
1686
+
1687
+ private final java .util .regex .Pattern NAME_PATTERN =
1688
+ java .util .regex .Pattern .compile ("^operations/.*$" );
1689
+
1690
+ /**
1691
+ * Deletes a long-running operation. This method indicates that the client is no longer interested
1692
+ * in the operation result. It does not cancel the operation. If the server doesn't support this
1693
+ * method, it returns `google.rpc.Code.UNIMPLEMENTED`.
1694
+ *
1695
+ * Create a request for the method "operations.delete".
1696
+ *
1697
+ * This request holds the parameters needed by the the cloudasset server. After setting any
1698
+ * optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
1699
+ * <p> {@link
1700
+ * Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
1701
+ * be called to initialize this instance immediately after invoking the constructor. </p>
1702
+ *
1703
+ * @param name The name of the operation resource to be deleted.
1704
+ * @since 1.13
1705
+ */
1706
+ protected Delete (java .lang .String name ) {
1707
+ super (CloudAsset .this , "DELETE" , REST_PATH , null , com .google .api .services .cloudasset .v1 .model .Empty .class );
1708
+ this .name = com .google .api .client .util .Preconditions .checkNotNull (name , "Required parameter name must be specified." );
1709
+ if (!getSuppressPatternChecks ()) {
1710
+ com .google .api .client .util .Preconditions .checkArgument (NAME_PATTERN .matcher (name ).matches (),
1711
+ "Parameter name must conform to the pattern " +
1712
+ "^operations/.*$" );
1713
+ }
1714
+ }
1715
+
1716
+ @ Override
1717
+ public Delete set$Xgafv (java .lang .String $Xgafv ) {
1718
+ return (Delete ) super .set$Xgafv ($Xgafv );
1719
+ }
1720
+
1721
+ @ Override
1722
+ public Delete setAccessToken (java .lang .String accessToken ) {
1723
+ return (Delete ) super .setAccessToken (accessToken );
1724
+ }
1725
+
1726
+ @ Override
1727
+ public Delete setAlt (java .lang .String alt ) {
1728
+ return (Delete ) super .setAlt (alt );
1729
+ }
1730
+
1731
+ @ Override
1732
+ public Delete setCallback (java .lang .String callback ) {
1733
+ return (Delete ) super .setCallback (callback );
1734
+ }
1735
+
1736
+ @ Override
1737
+ public Delete setFields (java .lang .String fields ) {
1738
+ return (Delete ) super .setFields (fields );
1739
+ }
1740
+
1741
+ @ Override
1742
+ public Delete setKey (java .lang .String key ) {
1743
+ return (Delete ) super .setKey (key );
1744
+ }
1745
+
1746
+ @ Override
1747
+ public Delete setOauthToken (java .lang .String oauthToken ) {
1748
+ return (Delete ) super .setOauthToken (oauthToken );
1749
+ }
1750
+
1751
+ @ Override
1752
+ public Delete setPrettyPrint (java .lang .Boolean prettyPrint ) {
1753
+ return (Delete ) super .setPrettyPrint (prettyPrint );
1754
+ }
1755
+
1756
+ @ Override
1757
+ public Delete setQuotaUser (java .lang .String quotaUser ) {
1758
+ return (Delete ) super .setQuotaUser (quotaUser );
1759
+ }
1760
+
1761
+ @ Override
1762
+ public Delete setUploadType (java .lang .String uploadType ) {
1763
+ return (Delete ) super .setUploadType (uploadType );
1764
+ }
1765
+
1766
+ @ Override
1767
+ public Delete setUploadProtocol (java .lang .String uploadProtocol ) {
1768
+ return (Delete ) super .setUploadProtocol (uploadProtocol );
1769
+ }
1770
+
1771
+ /** The name of the operation resource to be deleted. */
1772
+ @ com .google .api .client .util .Key
1773
+ private java .lang .String name ;
1774
+
1775
+ /** The name of the operation resource to be deleted.
1776
+ */
1777
+ public java .lang .String getName () {
1778
+ return name ;
1779
+ }
1780
+
1781
+ /** The name of the operation resource to be deleted. */
1782
+ public Delete setName (java .lang .String name ) {
1783
+ if (!getSuppressPatternChecks ()) {
1784
+ com .google .api .client .util .Preconditions .checkArgument (NAME_PATTERN .matcher (name ).matches (),
1785
+ "Parameter name must conform to the pattern " +
1786
+ "^operations/.*$" );
1787
+ }
1788
+ this .name = name ;
1789
+ return this ;
1790
+ }
1791
+
1792
+ @ Override
1793
+ public Delete set (String parameterName , Object value ) {
1794
+ return (Delete ) super .set (parameterName , value );
1795
+ }
1796
+ }
1521
1797
/**
1522
1798
* Gets the latest state of a long-running operation. Clients can use this method to poll the
1523
1799
* operation result at intervals as recommended by the API service.
0 commit comments