google-cloud-certificate_manager-v1 0.8.2 → 0.10.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.
@@ -360,7 +360,7 @@ module Google
360
360
  # @param order_by [::String]
361
361
  # A list of Certificate field names used to specify the order of the returned
362
362
  # results. The default sorting order is ascending. To specify descending
363
- # order for a field, add a suffix " desc".
363
+ # order for a field, add a suffix `" desc"`.
364
364
  # @yield [result, operation] Access the result along with the TransportOperation object
365
365
  # @yieldparam result [::Google::Cloud::CertificateManager::V1::ListCertificatesResponse]
366
366
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -802,7 +802,7 @@ module Google
802
802
  # @param order_by [::String]
803
803
  # A list of Certificate Map field names used to specify the order of the
804
804
  # returned results. The default sorting order is ascending. To specify
805
- # descending order for a field, add a suffix " desc".
805
+ # descending order for a field, add a suffix `" desc"`.
806
806
  # @yield [result, operation] Access the result along with the TransportOperation object
807
807
  # @yieldparam result [::Google::Cloud::CertificateManager::V1::ListCertificateMapsResponse]
808
808
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1251,7 +1251,7 @@ module Google
1251
1251
  # @param order_by [::String]
1252
1252
  # A list of Certificate Map Entry field names used to specify
1253
1253
  # the order of the returned results. The default sorting order is ascending.
1254
- # To specify descending order for a field, add a suffix " desc".
1254
+ # To specify descending order for a field, add a suffix `" desc"`.
1255
1255
  # @yield [result, operation] Access the result along with the TransportOperation object
1256
1256
  # @yieldparam result [::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesResponse]
1257
1257
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1693,7 +1693,7 @@ module Google
1693
1693
  # @param order_by [::String]
1694
1694
  # A list of Dns Authorization field names used to specify the order of the
1695
1695
  # returned results. The default sorting order is ascending. To specify
1696
- # descending order for a field, add a suffix " desc".
1696
+ # descending order for a field, add a suffix `" desc"`.
1697
1697
  # @yield [result, operation] Access the result along with the TransportOperation object
1698
1698
  # @yieldparam result [::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsResponse]
1699
1699
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -2136,7 +2136,7 @@ module Google
2136
2136
  # @param order_by [::String]
2137
2137
  # A list of Certificate Config field names used to specify the order of the
2138
2138
  # returned results. The default sorting order is ascending. To specify
2139
- # descending order for a field, add a suffix " desc".
2139
+ # descending order for a field, add a suffix `" desc"`.
2140
2140
  # @yield [result, operation] Access the result along with the TransportOperation object
2141
2141
  # @yieldparam result [::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsResponse]
2142
2142
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -2456,6 +2456,453 @@ module Google
2456
2456
  raise ::Google::Cloud::Error.from_error(e)
2457
2457
  end
2458
2458
 
2459
+ ##
2460
+ # Lists TrustConfigs in a given project and location.
2461
+ #
2462
+ # @overload list_trust_configs(request, options = nil)
2463
+ # Pass arguments to `list_trust_configs` via a request object, either of type
2464
+ # {::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest} or an equivalent Hash.
2465
+ #
2466
+ # @param request [::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest, ::Hash]
2467
+ # A request object representing the call parameters. Required. To specify no
2468
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2469
+ # @param options [::Gapic::CallOptions, ::Hash]
2470
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2471
+ #
2472
+ # @overload list_trust_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2473
+ # Pass arguments to `list_trust_configs` via keyword arguments. Note that at
2474
+ # least one keyword argument is required. To specify no parameters, or to keep all
2475
+ # the default parameter values, pass an empty Hash as a request object (see above).
2476
+ #
2477
+ # @param parent [::String]
2478
+ # Required. The project and location from which the TrustConfigs should be
2479
+ # listed, specified in the format `projects/*/locations/*`.
2480
+ # @param page_size [::Integer]
2481
+ # Maximum number of TrustConfigs to return per call.
2482
+ # @param page_token [::String]
2483
+ # The value returned by the last `ListTrustConfigsResponse`. Indicates
2484
+ # that this is a continuation of a prior `ListTrustConfigs` call, and that
2485
+ # the system should return the next page of data.
2486
+ # @param filter [::String]
2487
+ # Filter expression to restrict the TrustConfigs returned.
2488
+ # @param order_by [::String]
2489
+ # A list of TrustConfig field names used to specify the order of the
2490
+ # returned results. The default sorting order is ascending. To specify
2491
+ # descending order for a field, add a suffix `" desc"`.
2492
+ # @yield [result, operation] Access the result along with the TransportOperation object
2493
+ # @yieldparam result [::Google::Cloud::CertificateManager::V1::ListTrustConfigsResponse]
2494
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2495
+ #
2496
+ # @return [::Google::Cloud::CertificateManager::V1::ListTrustConfigsResponse]
2497
+ #
2498
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2499
+ #
2500
+ # @example Basic example
2501
+ # require "google/cloud/certificate_manager/v1"
2502
+ #
2503
+ # # Create a client object. The client can be reused for multiple calls.
2504
+ # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new
2505
+ #
2506
+ # # Create a request. To set request fields, pass in keyword arguments.
2507
+ # request = Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest.new
2508
+ #
2509
+ # # Call the list_trust_configs method.
2510
+ # result = client.list_trust_configs request
2511
+ #
2512
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2513
+ # # over elements, and API calls will be issued to fetch pages as needed.
2514
+ # result.each do |item|
2515
+ # # Each element is of type ::Google::Cloud::CertificateManager::V1::TrustConfig.
2516
+ # p item
2517
+ # end
2518
+ #
2519
+ def list_trust_configs request, options = nil
2520
+ raise ::ArgumentError, "request must be provided" if request.nil?
2521
+
2522
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest
2523
+
2524
+ # Converts hash and nil to an options object
2525
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2526
+
2527
+ # Customize the options with defaults
2528
+ call_metadata = @config.rpcs.list_trust_configs.metadata.to_h
2529
+
2530
+ # Set x-goog-api-client and x-goog-user-project headers
2531
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2532
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2533
+ gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION,
2534
+ transports_version_send: [:rest]
2535
+
2536
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2537
+
2538
+ options.apply_defaults timeout: @config.rpcs.list_trust_configs.timeout,
2539
+ metadata: call_metadata,
2540
+ retry_policy: @config.rpcs.list_trust_configs.retry_policy
2541
+
2542
+ options.apply_defaults timeout: @config.timeout,
2543
+ metadata: @config.metadata,
2544
+ retry_policy: @config.retry_policy
2545
+
2546
+ @certificate_manager_stub.list_trust_configs request, options do |result, operation|
2547
+ yield result, operation if block_given?
2548
+ return result
2549
+ end
2550
+ rescue ::Gapic::Rest::Error => e
2551
+ raise ::Google::Cloud::Error.from_error(e)
2552
+ end
2553
+
2554
+ ##
2555
+ # Gets details of a single TrustConfig.
2556
+ #
2557
+ # @overload get_trust_config(request, options = nil)
2558
+ # Pass arguments to `get_trust_config` via a request object, either of type
2559
+ # {::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest} or an equivalent Hash.
2560
+ #
2561
+ # @param request [::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest, ::Hash]
2562
+ # A request object representing the call parameters. Required. To specify no
2563
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2564
+ # @param options [::Gapic::CallOptions, ::Hash]
2565
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2566
+ #
2567
+ # @overload get_trust_config(name: nil)
2568
+ # Pass arguments to `get_trust_config` via keyword arguments. Note that at
2569
+ # least one keyword argument is required. To specify no parameters, or to keep all
2570
+ # the default parameter values, pass an empty Hash as a request object (see above).
2571
+ #
2572
+ # @param name [::String]
2573
+ # Required. A name of the TrustConfig to describe. Must be in the format
2574
+ # `projects/*/locations/*/trustConfigs/*`.
2575
+ # @yield [result, operation] Access the result along with the TransportOperation object
2576
+ # @yieldparam result [::Google::Cloud::CertificateManager::V1::TrustConfig]
2577
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2578
+ #
2579
+ # @return [::Google::Cloud::CertificateManager::V1::TrustConfig]
2580
+ #
2581
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2582
+ #
2583
+ # @example Basic example
2584
+ # require "google/cloud/certificate_manager/v1"
2585
+ #
2586
+ # # Create a client object. The client can be reused for multiple calls.
2587
+ # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new
2588
+ #
2589
+ # # Create a request. To set request fields, pass in keyword arguments.
2590
+ # request = Google::Cloud::CertificateManager::V1::GetTrustConfigRequest.new
2591
+ #
2592
+ # # Call the get_trust_config method.
2593
+ # result = client.get_trust_config request
2594
+ #
2595
+ # # The returned object is of type Google::Cloud::CertificateManager::V1::TrustConfig.
2596
+ # p result
2597
+ #
2598
+ def get_trust_config request, options = nil
2599
+ raise ::ArgumentError, "request must be provided" if request.nil?
2600
+
2601
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest
2602
+
2603
+ # Converts hash and nil to an options object
2604
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2605
+
2606
+ # Customize the options with defaults
2607
+ call_metadata = @config.rpcs.get_trust_config.metadata.to_h
2608
+
2609
+ # Set x-goog-api-client and x-goog-user-project headers
2610
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2611
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2612
+ gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION,
2613
+ transports_version_send: [:rest]
2614
+
2615
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2616
+
2617
+ options.apply_defaults timeout: @config.rpcs.get_trust_config.timeout,
2618
+ metadata: call_metadata,
2619
+ retry_policy: @config.rpcs.get_trust_config.retry_policy
2620
+
2621
+ options.apply_defaults timeout: @config.timeout,
2622
+ metadata: @config.metadata,
2623
+ retry_policy: @config.retry_policy
2624
+
2625
+ @certificate_manager_stub.get_trust_config request, options do |result, operation|
2626
+ yield result, operation if block_given?
2627
+ return result
2628
+ end
2629
+ rescue ::Gapic::Rest::Error => e
2630
+ raise ::Google::Cloud::Error.from_error(e)
2631
+ end
2632
+
2633
+ ##
2634
+ # Creates a new TrustConfig in a given project and location.
2635
+ #
2636
+ # @overload create_trust_config(request, options = nil)
2637
+ # Pass arguments to `create_trust_config` via a request object, either of type
2638
+ # {::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest} or an equivalent Hash.
2639
+ #
2640
+ # @param request [::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest, ::Hash]
2641
+ # A request object representing the call parameters. Required. To specify no
2642
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2643
+ # @param options [::Gapic::CallOptions, ::Hash]
2644
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2645
+ #
2646
+ # @overload create_trust_config(parent: nil, trust_config_id: nil, trust_config: nil)
2647
+ # Pass arguments to `create_trust_config` via keyword arguments. Note that at
2648
+ # least one keyword argument is required. To specify no parameters, or to keep all
2649
+ # the default parameter values, pass an empty Hash as a request object (see above).
2650
+ #
2651
+ # @param parent [::String]
2652
+ # Required. The parent resource of the TrustConfig. Must be in the format
2653
+ # `projects/*/locations/*`.
2654
+ # @param trust_config_id [::String]
2655
+ # Required. A user-provided name of the TrustConfig. Must match the regexp
2656
+ # `[a-z0-9-]{1,63}`.
2657
+ # @param trust_config [::Google::Cloud::CertificateManager::V1::TrustConfig, ::Hash]
2658
+ # Required. A definition of the TrustConfig to create.
2659
+ # @yield [result, operation] Access the result along with the TransportOperation object
2660
+ # @yieldparam result [::Gapic::Operation]
2661
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2662
+ #
2663
+ # @return [::Gapic::Operation]
2664
+ #
2665
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2666
+ #
2667
+ # @example Basic example
2668
+ # require "google/cloud/certificate_manager/v1"
2669
+ #
2670
+ # # Create a client object. The client can be reused for multiple calls.
2671
+ # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new
2672
+ #
2673
+ # # Create a request. To set request fields, pass in keyword arguments.
2674
+ # request = Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest.new
2675
+ #
2676
+ # # Call the create_trust_config method.
2677
+ # result = client.create_trust_config request
2678
+ #
2679
+ # # The returned object is of type Gapic::Operation. You can use it to
2680
+ # # check the status of an operation, cancel it, or wait for results.
2681
+ # # Here is how to wait for a response.
2682
+ # result.wait_until_done! timeout: 60
2683
+ # if result.response?
2684
+ # p result.response
2685
+ # else
2686
+ # puts "No response received."
2687
+ # end
2688
+ #
2689
+ def create_trust_config request, options = nil
2690
+ raise ::ArgumentError, "request must be provided" if request.nil?
2691
+
2692
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest
2693
+
2694
+ # Converts hash and nil to an options object
2695
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2696
+
2697
+ # Customize the options with defaults
2698
+ call_metadata = @config.rpcs.create_trust_config.metadata.to_h
2699
+
2700
+ # Set x-goog-api-client and x-goog-user-project headers
2701
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2702
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2703
+ gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION,
2704
+ transports_version_send: [:rest]
2705
+
2706
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2707
+
2708
+ options.apply_defaults timeout: @config.rpcs.create_trust_config.timeout,
2709
+ metadata: call_metadata,
2710
+ retry_policy: @config.rpcs.create_trust_config.retry_policy
2711
+
2712
+ options.apply_defaults timeout: @config.timeout,
2713
+ metadata: @config.metadata,
2714
+ retry_policy: @config.retry_policy
2715
+
2716
+ @certificate_manager_stub.create_trust_config request, options do |result, operation|
2717
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2718
+ yield result, operation if block_given?
2719
+ return result
2720
+ end
2721
+ rescue ::Gapic::Rest::Error => e
2722
+ raise ::Google::Cloud::Error.from_error(e)
2723
+ end
2724
+
2725
+ ##
2726
+ # Updates a TrustConfig.
2727
+ #
2728
+ # @overload update_trust_config(request, options = nil)
2729
+ # Pass arguments to `update_trust_config` via a request object, either of type
2730
+ # {::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest} or an equivalent Hash.
2731
+ #
2732
+ # @param request [::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest, ::Hash]
2733
+ # A request object representing the call parameters. Required. To specify no
2734
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2735
+ # @param options [::Gapic::CallOptions, ::Hash]
2736
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2737
+ #
2738
+ # @overload update_trust_config(trust_config: nil, update_mask: nil)
2739
+ # Pass arguments to `update_trust_config` via keyword arguments. Note that at
2740
+ # least one keyword argument is required. To specify no parameters, or to keep all
2741
+ # the default parameter values, pass an empty Hash as a request object (see above).
2742
+ #
2743
+ # @param trust_config [::Google::Cloud::CertificateManager::V1::TrustConfig, ::Hash]
2744
+ # Required. A definition of the TrustConfig to update.
2745
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2746
+ # Required. The update mask applies to the resource. For the `FieldMask`
2747
+ # definition, see
2748
+ # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
2749
+ # @yield [result, operation] Access the result along with the TransportOperation object
2750
+ # @yieldparam result [::Gapic::Operation]
2751
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2752
+ #
2753
+ # @return [::Gapic::Operation]
2754
+ #
2755
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2756
+ #
2757
+ # @example Basic example
2758
+ # require "google/cloud/certificate_manager/v1"
2759
+ #
2760
+ # # Create a client object. The client can be reused for multiple calls.
2761
+ # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new
2762
+ #
2763
+ # # Create a request. To set request fields, pass in keyword arguments.
2764
+ # request = Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest.new
2765
+ #
2766
+ # # Call the update_trust_config method.
2767
+ # result = client.update_trust_config request
2768
+ #
2769
+ # # The returned object is of type Gapic::Operation. You can use it to
2770
+ # # check the status of an operation, cancel it, or wait for results.
2771
+ # # Here is how to wait for a response.
2772
+ # result.wait_until_done! timeout: 60
2773
+ # if result.response?
2774
+ # p result.response
2775
+ # else
2776
+ # puts "No response received."
2777
+ # end
2778
+ #
2779
+ def update_trust_config request, options = nil
2780
+ raise ::ArgumentError, "request must be provided" if request.nil?
2781
+
2782
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest
2783
+
2784
+ # Converts hash and nil to an options object
2785
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2786
+
2787
+ # Customize the options with defaults
2788
+ call_metadata = @config.rpcs.update_trust_config.metadata.to_h
2789
+
2790
+ # Set x-goog-api-client and x-goog-user-project headers
2791
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2792
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2793
+ gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION,
2794
+ transports_version_send: [:rest]
2795
+
2796
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2797
+
2798
+ options.apply_defaults timeout: @config.rpcs.update_trust_config.timeout,
2799
+ metadata: call_metadata,
2800
+ retry_policy: @config.rpcs.update_trust_config.retry_policy
2801
+
2802
+ options.apply_defaults timeout: @config.timeout,
2803
+ metadata: @config.metadata,
2804
+ retry_policy: @config.retry_policy
2805
+
2806
+ @certificate_manager_stub.update_trust_config request, options do |result, operation|
2807
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2808
+ yield result, operation if block_given?
2809
+ return result
2810
+ end
2811
+ rescue ::Gapic::Rest::Error => e
2812
+ raise ::Google::Cloud::Error.from_error(e)
2813
+ end
2814
+
2815
+ ##
2816
+ # Deletes a single TrustConfig.
2817
+ #
2818
+ # @overload delete_trust_config(request, options = nil)
2819
+ # Pass arguments to `delete_trust_config` via a request object, either of type
2820
+ # {::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest} or an equivalent Hash.
2821
+ #
2822
+ # @param request [::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest, ::Hash]
2823
+ # A request object representing the call parameters. Required. To specify no
2824
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2825
+ # @param options [::Gapic::CallOptions, ::Hash]
2826
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2827
+ #
2828
+ # @overload delete_trust_config(name: nil, etag: nil)
2829
+ # Pass arguments to `delete_trust_config` via keyword arguments. Note that at
2830
+ # least one keyword argument is required. To specify no parameters, or to keep all
2831
+ # the default parameter values, pass an empty Hash as a request object (see above).
2832
+ #
2833
+ # @param name [::String]
2834
+ # Required. A name of the TrustConfig to delete. Must be in the format
2835
+ # `projects/*/locations/*/trustConfigs/*`.
2836
+ # @param etag [::String]
2837
+ # The current etag of the TrustConfig.
2838
+ # If an etag is provided and does not match the current etag of the resource,
2839
+ # deletion will be blocked and an ABORTED error will be returned.
2840
+ # @yield [result, operation] Access the result along with the TransportOperation object
2841
+ # @yieldparam result [::Gapic::Operation]
2842
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2843
+ #
2844
+ # @return [::Gapic::Operation]
2845
+ #
2846
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2847
+ #
2848
+ # @example Basic example
2849
+ # require "google/cloud/certificate_manager/v1"
2850
+ #
2851
+ # # Create a client object. The client can be reused for multiple calls.
2852
+ # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new
2853
+ #
2854
+ # # Create a request. To set request fields, pass in keyword arguments.
2855
+ # request = Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest.new
2856
+ #
2857
+ # # Call the delete_trust_config method.
2858
+ # result = client.delete_trust_config request
2859
+ #
2860
+ # # The returned object is of type Gapic::Operation. You can use it to
2861
+ # # check the status of an operation, cancel it, or wait for results.
2862
+ # # Here is how to wait for a response.
2863
+ # result.wait_until_done! timeout: 60
2864
+ # if result.response?
2865
+ # p result.response
2866
+ # else
2867
+ # puts "No response received."
2868
+ # end
2869
+ #
2870
+ def delete_trust_config request, options = nil
2871
+ raise ::ArgumentError, "request must be provided" if request.nil?
2872
+
2873
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest
2874
+
2875
+ # Converts hash and nil to an options object
2876
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2877
+
2878
+ # Customize the options with defaults
2879
+ call_metadata = @config.rpcs.delete_trust_config.metadata.to_h
2880
+
2881
+ # Set x-goog-api-client and x-goog-user-project headers
2882
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2883
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2884
+ gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION,
2885
+ transports_version_send: [:rest]
2886
+
2887
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2888
+
2889
+ options.apply_defaults timeout: @config.rpcs.delete_trust_config.timeout,
2890
+ metadata: call_metadata,
2891
+ retry_policy: @config.rpcs.delete_trust_config.retry_policy
2892
+
2893
+ options.apply_defaults timeout: @config.timeout,
2894
+ metadata: @config.metadata,
2895
+ retry_policy: @config.retry_policy
2896
+
2897
+ @certificate_manager_stub.delete_trust_config request, options do |result, operation|
2898
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2899
+ yield result, operation if block_given?
2900
+ return result
2901
+ end
2902
+ rescue ::Gapic::Rest::Error => e
2903
+ raise ::Google::Cloud::Error.from_error(e)
2904
+ end
2905
+
2459
2906
  ##
2460
2907
  # Configuration class for the CertificateManager REST API.
2461
2908
  #
@@ -2716,6 +3163,31 @@ module Google
2716
3163
  # @return [::Gapic::Config::Method]
2717
3164
  #
2718
3165
  attr_reader :delete_certificate_issuance_config
3166
+ ##
3167
+ # RPC-specific configuration for `list_trust_configs`
3168
+ # @return [::Gapic::Config::Method]
3169
+ #
3170
+ attr_reader :list_trust_configs
3171
+ ##
3172
+ # RPC-specific configuration for `get_trust_config`
3173
+ # @return [::Gapic::Config::Method]
3174
+ #
3175
+ attr_reader :get_trust_config
3176
+ ##
3177
+ # RPC-specific configuration for `create_trust_config`
3178
+ # @return [::Gapic::Config::Method]
3179
+ #
3180
+ attr_reader :create_trust_config
3181
+ ##
3182
+ # RPC-specific configuration for `update_trust_config`
3183
+ # @return [::Gapic::Config::Method]
3184
+ #
3185
+ attr_reader :update_trust_config
3186
+ ##
3187
+ # RPC-specific configuration for `delete_trust_config`
3188
+ # @return [::Gapic::Config::Method]
3189
+ #
3190
+ attr_reader :delete_trust_config
2719
3191
 
2720
3192
  # @private
2721
3193
  def initialize parent_rpcs = nil
@@ -2767,6 +3239,16 @@ module Google
2767
3239
  @create_certificate_issuance_config = ::Gapic::Config::Method.new create_certificate_issuance_config_config
2768
3240
  delete_certificate_issuance_config_config = parent_rpcs.delete_certificate_issuance_config if parent_rpcs.respond_to? :delete_certificate_issuance_config
2769
3241
  @delete_certificate_issuance_config = ::Gapic::Config::Method.new delete_certificate_issuance_config_config
3242
+ list_trust_configs_config = parent_rpcs.list_trust_configs if parent_rpcs.respond_to? :list_trust_configs
3243
+ @list_trust_configs = ::Gapic::Config::Method.new list_trust_configs_config
3244
+ get_trust_config_config = parent_rpcs.get_trust_config if parent_rpcs.respond_to? :get_trust_config
3245
+ @get_trust_config = ::Gapic::Config::Method.new get_trust_config_config
3246
+ create_trust_config_config = parent_rpcs.create_trust_config if parent_rpcs.respond_to? :create_trust_config
3247
+ @create_trust_config = ::Gapic::Config::Method.new create_trust_config_config
3248
+ update_trust_config_config = parent_rpcs.update_trust_config if parent_rpcs.respond_to? :update_trust_config
3249
+ @update_trust_config = ::Gapic::Config::Method.new update_trust_config_config
3250
+ delete_trust_config_config = parent_rpcs.delete_trust_config if parent_rpcs.respond_to? :delete_trust_config
3251
+ @delete_trust_config = ::Gapic::Config::Method.new delete_trust_config_config
2770
3252
 
2771
3253
  yield self if block_given?
2772
3254
  end