google-cloud-deploy-v1 0.14.0 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -458,6 +458,196 @@ module Google
458
458
  result
459
459
  end
460
460
 
461
+ ##
462
+ # Baseline implementation for the list_custom_target_types REST call
463
+ #
464
+ # @param request_pb [::Google::Cloud::Deploy::V1::ListCustomTargetTypesRequest]
465
+ # A request object representing the call parameters. Required.
466
+ # @param options [::Gapic::CallOptions]
467
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
468
+ #
469
+ # @yield [result, operation] Access the result along with the TransportOperation object
470
+ # @yieldparam result [::Google::Cloud::Deploy::V1::ListCustomTargetTypesResponse]
471
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
472
+ #
473
+ # @return [::Google::Cloud::Deploy::V1::ListCustomTargetTypesResponse]
474
+ # A result object deserialized from the server's reply
475
+ def list_custom_target_types request_pb, options = nil
476
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
477
+
478
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_custom_target_types_request request_pb
479
+ query_string_params = if query_string_params.any?
480
+ query_string_params.to_h { |p| p.split "=", 2 }
481
+ else
482
+ {}
483
+ end
484
+
485
+ response = @client_stub.make_http_request(
486
+ verb,
487
+ uri: uri,
488
+ body: body || "",
489
+ params: query_string_params,
490
+ options: options
491
+ )
492
+ operation = ::Gapic::Rest::TransportOperation.new response
493
+ result = ::Google::Cloud::Deploy::V1::ListCustomTargetTypesResponse.decode_json response.body, ignore_unknown_fields: true
494
+
495
+ yield result, operation if block_given?
496
+ result
497
+ end
498
+
499
+ ##
500
+ # Baseline implementation for the get_custom_target_type REST call
501
+ #
502
+ # @param request_pb [::Google::Cloud::Deploy::V1::GetCustomTargetTypeRequest]
503
+ # A request object representing the call parameters. Required.
504
+ # @param options [::Gapic::CallOptions]
505
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
506
+ #
507
+ # @yield [result, operation] Access the result along with the TransportOperation object
508
+ # @yieldparam result [::Google::Cloud::Deploy::V1::CustomTargetType]
509
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
510
+ #
511
+ # @return [::Google::Cloud::Deploy::V1::CustomTargetType]
512
+ # A result object deserialized from the server's reply
513
+ def get_custom_target_type request_pb, options = nil
514
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
515
+
516
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_custom_target_type_request request_pb
517
+ query_string_params = if query_string_params.any?
518
+ query_string_params.to_h { |p| p.split "=", 2 }
519
+ else
520
+ {}
521
+ end
522
+
523
+ response = @client_stub.make_http_request(
524
+ verb,
525
+ uri: uri,
526
+ body: body || "",
527
+ params: query_string_params,
528
+ options: options
529
+ )
530
+ operation = ::Gapic::Rest::TransportOperation.new response
531
+ result = ::Google::Cloud::Deploy::V1::CustomTargetType.decode_json response.body, ignore_unknown_fields: true
532
+
533
+ yield result, operation if block_given?
534
+ result
535
+ end
536
+
537
+ ##
538
+ # Baseline implementation for the create_custom_target_type REST call
539
+ #
540
+ # @param request_pb [::Google::Cloud::Deploy::V1::CreateCustomTargetTypeRequest]
541
+ # A request object representing the call parameters. Required.
542
+ # @param options [::Gapic::CallOptions]
543
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
544
+ #
545
+ # @yield [result, operation] Access the result along with the TransportOperation object
546
+ # @yieldparam result [::Google::Longrunning::Operation]
547
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
548
+ #
549
+ # @return [::Google::Longrunning::Operation]
550
+ # A result object deserialized from the server's reply
551
+ def create_custom_target_type request_pb, options = nil
552
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
553
+
554
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_custom_target_type_request request_pb
555
+ query_string_params = if query_string_params.any?
556
+ query_string_params.to_h { |p| p.split "=", 2 }
557
+ else
558
+ {}
559
+ end
560
+
561
+ response = @client_stub.make_http_request(
562
+ verb,
563
+ uri: uri,
564
+ body: body || "",
565
+ params: query_string_params,
566
+ options: options
567
+ )
568
+ operation = ::Gapic::Rest::TransportOperation.new response
569
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
570
+
571
+ yield result, operation if block_given?
572
+ result
573
+ end
574
+
575
+ ##
576
+ # Baseline implementation for the update_custom_target_type REST call
577
+ #
578
+ # @param request_pb [::Google::Cloud::Deploy::V1::UpdateCustomTargetTypeRequest]
579
+ # A request object representing the call parameters. Required.
580
+ # @param options [::Gapic::CallOptions]
581
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
582
+ #
583
+ # @yield [result, operation] Access the result along with the TransportOperation object
584
+ # @yieldparam result [::Google::Longrunning::Operation]
585
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
586
+ #
587
+ # @return [::Google::Longrunning::Operation]
588
+ # A result object deserialized from the server's reply
589
+ def update_custom_target_type request_pb, options = nil
590
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
591
+
592
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_custom_target_type_request request_pb
593
+ query_string_params = if query_string_params.any?
594
+ query_string_params.to_h { |p| p.split "=", 2 }
595
+ else
596
+ {}
597
+ end
598
+
599
+ response = @client_stub.make_http_request(
600
+ verb,
601
+ uri: uri,
602
+ body: body || "",
603
+ params: query_string_params,
604
+ options: options
605
+ )
606
+ operation = ::Gapic::Rest::TransportOperation.new response
607
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
608
+
609
+ yield result, operation if block_given?
610
+ result
611
+ end
612
+
613
+ ##
614
+ # Baseline implementation for the delete_custom_target_type REST call
615
+ #
616
+ # @param request_pb [::Google::Cloud::Deploy::V1::DeleteCustomTargetTypeRequest]
617
+ # A request object representing the call parameters. Required.
618
+ # @param options [::Gapic::CallOptions]
619
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
620
+ #
621
+ # @yield [result, operation] Access the result along with the TransportOperation object
622
+ # @yieldparam result [::Google::Longrunning::Operation]
623
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
624
+ #
625
+ # @return [::Google::Longrunning::Operation]
626
+ # A result object deserialized from the server's reply
627
+ def delete_custom_target_type request_pb, options = nil
628
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
629
+
630
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_custom_target_type_request request_pb
631
+ query_string_params = if query_string_params.any?
632
+ query_string_params.to_h { |p| p.split "=", 2 }
633
+ else
634
+ {}
635
+ end
636
+
637
+ response = @client_stub.make_http_request(
638
+ verb,
639
+ uri: uri,
640
+ body: body || "",
641
+ params: query_string_params,
642
+ options: options
643
+ )
644
+ operation = ::Gapic::Rest::TransportOperation.new response
645
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
646
+
647
+ yield result, operation if block_given?
648
+ result
649
+ end
650
+
461
651
  ##
462
652
  # Baseline implementation for the list_releases REST call
463
653
  #
@@ -1606,6 +1796,113 @@ module Google
1606
1796
  transcoder.transcode request_pb
1607
1797
  end
1608
1798
 
1799
+ ##
1800
+ # @private
1801
+ #
1802
+ # GRPC transcoding helper method for the list_custom_target_types REST call
1803
+ #
1804
+ # @param request_pb [::Google::Cloud::Deploy::V1::ListCustomTargetTypesRequest]
1805
+ # A request object representing the call parameters. Required.
1806
+ # @return [Array(String, [String, nil], Hash{String => String})]
1807
+ # Uri, Body, Query string parameters
1808
+ def self.transcode_list_custom_target_types_request request_pb
1809
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1810
+ .with_bindings(
1811
+ uri_method: :get,
1812
+ uri_template: "/v1/{parent}/customTargetTypes",
1813
+ matches: [
1814
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
1815
+ ]
1816
+ )
1817
+ transcoder.transcode request_pb
1818
+ end
1819
+
1820
+ ##
1821
+ # @private
1822
+ #
1823
+ # GRPC transcoding helper method for the get_custom_target_type REST call
1824
+ #
1825
+ # @param request_pb [::Google::Cloud::Deploy::V1::GetCustomTargetTypeRequest]
1826
+ # A request object representing the call parameters. Required.
1827
+ # @return [Array(String, [String, nil], Hash{String => String})]
1828
+ # Uri, Body, Query string parameters
1829
+ def self.transcode_get_custom_target_type_request request_pb
1830
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1831
+ .with_bindings(
1832
+ uri_method: :get,
1833
+ uri_template: "/v1/{name}",
1834
+ matches: [
1835
+ ["name", %r{^projects/[^/]+/locations/[^/]+/customTargetTypes/[^/]+/?$}, false]
1836
+ ]
1837
+ )
1838
+ transcoder.transcode request_pb
1839
+ end
1840
+
1841
+ ##
1842
+ # @private
1843
+ #
1844
+ # GRPC transcoding helper method for the create_custom_target_type REST call
1845
+ #
1846
+ # @param request_pb [::Google::Cloud::Deploy::V1::CreateCustomTargetTypeRequest]
1847
+ # A request object representing the call parameters. Required.
1848
+ # @return [Array(String, [String, nil], Hash{String => String})]
1849
+ # Uri, Body, Query string parameters
1850
+ def self.transcode_create_custom_target_type_request request_pb
1851
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1852
+ .with_bindings(
1853
+ uri_method: :post,
1854
+ uri_template: "/v1/{parent}/customTargetTypes",
1855
+ body: "custom_target_type",
1856
+ matches: [
1857
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
1858
+ ]
1859
+ )
1860
+ transcoder.transcode request_pb
1861
+ end
1862
+
1863
+ ##
1864
+ # @private
1865
+ #
1866
+ # GRPC transcoding helper method for the update_custom_target_type REST call
1867
+ #
1868
+ # @param request_pb [::Google::Cloud::Deploy::V1::UpdateCustomTargetTypeRequest]
1869
+ # A request object representing the call parameters. Required.
1870
+ # @return [Array(String, [String, nil], Hash{String => String})]
1871
+ # Uri, Body, Query string parameters
1872
+ def self.transcode_update_custom_target_type_request request_pb
1873
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1874
+ .with_bindings(
1875
+ uri_method: :patch,
1876
+ uri_template: "/v1/{custom_target_type.name}",
1877
+ body: "custom_target_type",
1878
+ matches: [
1879
+ ["custom_target_type.name", %r{^projects/[^/]+/locations/[^/]+/customTargetTypes/[^/]+/?$}, false]
1880
+ ]
1881
+ )
1882
+ transcoder.transcode request_pb
1883
+ end
1884
+
1885
+ ##
1886
+ # @private
1887
+ #
1888
+ # GRPC transcoding helper method for the delete_custom_target_type REST call
1889
+ #
1890
+ # @param request_pb [::Google::Cloud::Deploy::V1::DeleteCustomTargetTypeRequest]
1891
+ # A request object representing the call parameters. Required.
1892
+ # @return [Array(String, [String, nil], Hash{String => String})]
1893
+ # Uri, Body, Query string parameters
1894
+ def self.transcode_delete_custom_target_type_request request_pb
1895
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1896
+ .with_bindings(
1897
+ uri_method: :delete,
1898
+ uri_template: "/v1/{name}",
1899
+ matches: [
1900
+ ["name", %r{^projects/[^/]+/locations/[^/]+/customTargetTypes/[^/]+/?$}, false]
1901
+ ]
1902
+ )
1903
+ transcoder.transcode request_pb
1904
+ end
1905
+
1609
1906
  ##
1610
1907
  # @private
1611
1908
  #