|
33 | 33 |
|
34 | 34 | from google.api_core import operation # type: ignore |
35 | 35 | from google.api_core import operation_async # type: ignore |
| 36 | +from google.cloud.location import locations_pb2 # type: ignore |
| 37 | +from google.longrunning import operations_pb2 |
36 | 38 | from google.protobuf import empty_pb2 # type: ignore |
37 | 39 | from google.protobuf import field_mask_pb2 # type: ignore |
38 | 40 | from google.protobuf import timestamp_pb2 # type: ignore |
@@ -101,18 +103,6 @@ class CertificateManagerAsyncClient: |
101 | 103 | parse_dns_authorization_path = staticmethod( |
102 | 104 | CertificateManagerClient.parse_dns_authorization_path |
103 | 105 | ) |
104 | | - target_https_proxies_path = staticmethod( |
105 | | - CertificateManagerClient.target_https_proxies_path |
106 | | - ) |
107 | | - parse_target_https_proxies_path = staticmethod( |
108 | | - CertificateManagerClient.parse_target_https_proxies_path |
109 | | - ) |
110 | | - target_ssl_proxies_path = staticmethod( |
111 | | - CertificateManagerClient.target_ssl_proxies_path |
112 | | - ) |
113 | | - parse_target_ssl_proxies_path = staticmethod( |
114 | | - CertificateManagerClient.parse_target_ssl_proxies_path |
115 | | - ) |
116 | 106 | common_billing_account_path = staticmethod( |
117 | 107 | CertificateManagerClient.common_billing_account_path |
118 | 108 | ) |
@@ -2792,6 +2782,331 @@ async def sample_delete_dns_authorization(): |
2792 | 2782 | # Done; return the response. |
2793 | 2783 | return response |
2794 | 2784 |
|
| 2785 | + async def list_operations( |
| 2786 | + self, |
| 2787 | + request: operations_pb2.ListOperationsRequest = None, |
| 2788 | + *, |
| 2789 | + retry: OptionalRetry = gapic_v1.method.DEFAULT, |
| 2790 | + timeout: float = None, |
| 2791 | + metadata: Sequence[Tuple[str, str]] = (), |
| 2792 | + ) -> operations_pb2.ListOperationsResponse: |
| 2793 | + r"""Lists operations that match the specified filter in the request. |
| 2794 | +
|
| 2795 | + Args: |
| 2796 | + request (:class:`~.operations_pb2.ListOperationsRequest`): |
| 2797 | + The request object. Request message for |
| 2798 | + `ListOperations` method. |
| 2799 | + retry (google.api_core.retry.Retry): Designation of what errors, |
| 2800 | + if any, should be retried. |
| 2801 | + timeout (float): The timeout for this request. |
| 2802 | + metadata (Sequence[Tuple[str, str]]): Strings which should be |
| 2803 | + sent along with the request as metadata. |
| 2804 | + Returns: |
| 2805 | + ~.operations_pb2.ListOperationsResponse: |
| 2806 | + Response message for ``ListOperations`` method. |
| 2807 | + """ |
| 2808 | + # Create or coerce a protobuf request object. |
| 2809 | + # The request isn't a proto-plus wrapped type, |
| 2810 | + # so it must be constructed via keyword expansion. |
| 2811 | + if isinstance(request, dict): |
| 2812 | + request = operations_pb2.ListOperationsRequest(**request) |
| 2813 | + |
| 2814 | + # Wrap the RPC method; this adds retry and timeout information, |
| 2815 | + # and friendly error handling. |
| 2816 | + rpc = gapic_v1.method.wrap_method( |
| 2817 | + self._client._transport.list_operations, |
| 2818 | + default_timeout=None, |
| 2819 | + client_info=DEFAULT_CLIENT_INFO, |
| 2820 | + ) |
| 2821 | + |
| 2822 | + # Certain fields should be provided within the metadata header; |
| 2823 | + # add these here. |
| 2824 | + metadata = tuple(metadata) + ( |
| 2825 | + gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)), |
| 2826 | + ) |
| 2827 | + |
| 2828 | + # Send the request. |
| 2829 | + response = await rpc( |
| 2830 | + request, |
| 2831 | + retry=retry, |
| 2832 | + timeout=timeout, |
| 2833 | + metadata=metadata, |
| 2834 | + ) |
| 2835 | + |
| 2836 | + # Done; return the response. |
| 2837 | + return response |
| 2838 | + |
| 2839 | + async def get_operation( |
| 2840 | + self, |
| 2841 | + request: operations_pb2.GetOperationRequest = None, |
| 2842 | + *, |
| 2843 | + retry: OptionalRetry = gapic_v1.method.DEFAULT, |
| 2844 | + timeout: float = None, |
| 2845 | + metadata: Sequence[Tuple[str, str]] = (), |
| 2846 | + ) -> operations_pb2.Operation: |
| 2847 | + r"""Gets the latest state of a long-running operation. |
| 2848 | +
|
| 2849 | + Args: |
| 2850 | + request (:class:`~.operations_pb2.GetOperationRequest`): |
| 2851 | + The request object. Request message for |
| 2852 | + `GetOperation` method. |
| 2853 | + retry (google.api_core.retry.Retry): Designation of what errors, |
| 2854 | + if any, should be retried. |
| 2855 | + timeout (float): The timeout for this request. |
| 2856 | + metadata (Sequence[Tuple[str, str]]): Strings which should be |
| 2857 | + sent along with the request as metadata. |
| 2858 | + Returns: |
| 2859 | + ~.operations_pb2.Operation: |
| 2860 | + An ``Operation`` object. |
| 2861 | + """ |
| 2862 | + # Create or coerce a protobuf request object. |
| 2863 | + # The request isn't a proto-plus wrapped type, |
| 2864 | + # so it must be constructed via keyword expansion. |
| 2865 | + if isinstance(request, dict): |
| 2866 | + request = operations_pb2.GetOperationRequest(**request) |
| 2867 | + |
| 2868 | + # Wrap the RPC method; this adds retry and timeout information, |
| 2869 | + # and friendly error handling. |
| 2870 | + rpc = gapic_v1.method.wrap_method( |
| 2871 | + self._client._transport.get_operation, |
| 2872 | + default_timeout=None, |
| 2873 | + client_info=DEFAULT_CLIENT_INFO, |
| 2874 | + ) |
| 2875 | + |
| 2876 | + # Certain fields should be provided within the metadata header; |
| 2877 | + # add these here. |
| 2878 | + metadata = tuple(metadata) + ( |
| 2879 | + gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)), |
| 2880 | + ) |
| 2881 | + |
| 2882 | + # Send the request. |
| 2883 | + response = await rpc( |
| 2884 | + request, |
| 2885 | + retry=retry, |
| 2886 | + timeout=timeout, |
| 2887 | + metadata=metadata, |
| 2888 | + ) |
| 2889 | + |
| 2890 | + # Done; return the response. |
| 2891 | + return response |
| 2892 | + |
| 2893 | + async def delete_operation( |
| 2894 | + self, |
| 2895 | + request: operations_pb2.DeleteOperationRequest = None, |
| 2896 | + *, |
| 2897 | + retry: OptionalRetry = gapic_v1.method.DEFAULT, |
| 2898 | + timeout: float = None, |
| 2899 | + metadata: Sequence[Tuple[str, str]] = (), |
| 2900 | + ) -> None: |
| 2901 | + r"""Deletes a long-running operation. |
| 2902 | +
|
| 2903 | + This method indicates that the client is no longer interested |
| 2904 | + in the operation result. It does not cancel the operation. |
| 2905 | + If the server doesn't support this method, it returns |
| 2906 | + `google.rpc.Code.UNIMPLEMENTED`. |
| 2907 | +
|
| 2908 | + Args: |
| 2909 | + request (:class:`~.operations_pb2.DeleteOperationRequest`): |
| 2910 | + The request object. Request message for |
| 2911 | + `DeleteOperation` method. |
| 2912 | + retry (google.api_core.retry.Retry): Designation of what errors, |
| 2913 | + if any, should be retried. |
| 2914 | + timeout (float): The timeout for this request. |
| 2915 | + metadata (Sequence[Tuple[str, str]]): Strings which should be |
| 2916 | + sent along with the request as metadata. |
| 2917 | + Returns: |
| 2918 | + None |
| 2919 | + """ |
| 2920 | + # Create or coerce a protobuf request object. |
| 2921 | + # The request isn't a proto-plus wrapped type, |
| 2922 | + # so it must be constructed via keyword expansion. |
| 2923 | + if isinstance(request, dict): |
| 2924 | + request = operations_pb2.DeleteOperationRequest(**request) |
| 2925 | + |
| 2926 | + # Wrap the RPC method; this adds retry and timeout information, |
| 2927 | + # and friendly error handling. |
| 2928 | + rpc = gapic_v1.method.wrap_method( |
| 2929 | + self._client._transport.delete_operation, |
| 2930 | + default_timeout=None, |
| 2931 | + client_info=DEFAULT_CLIENT_INFO, |
| 2932 | + ) |
| 2933 | + |
| 2934 | + # Certain fields should be provided within the metadata header; |
| 2935 | + # add these here. |
| 2936 | + metadata = tuple(metadata) + ( |
| 2937 | + gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)), |
| 2938 | + ) |
| 2939 | + |
| 2940 | + # Send the request. |
| 2941 | + await rpc( |
| 2942 | + request, |
| 2943 | + retry=retry, |
| 2944 | + timeout=timeout, |
| 2945 | + metadata=metadata, |
| 2946 | + ) |
| 2947 | + |
| 2948 | + async def cancel_operation( |
| 2949 | + self, |
| 2950 | + request: operations_pb2.CancelOperationRequest = None, |
| 2951 | + *, |
| 2952 | + retry: OptionalRetry = gapic_v1.method.DEFAULT, |
| 2953 | + timeout: float = None, |
| 2954 | + metadata: Sequence[Tuple[str, str]] = (), |
| 2955 | + ) -> None: |
| 2956 | + r"""Starts asynchronous cancellation on a long-running operation. |
| 2957 | +
|
| 2958 | + The server makes a best effort to cancel the operation, but success |
| 2959 | + is not guaranteed. If the server doesn't support this method, it returns |
| 2960 | + `google.rpc.Code.UNIMPLEMENTED`. |
| 2961 | +
|
| 2962 | + Args: |
| 2963 | + request (:class:`~.operations_pb2.CancelOperationRequest`): |
| 2964 | + The request object. Request message for |
| 2965 | + `CancelOperation` method. |
| 2966 | + retry (google.api_core.retry.Retry): Designation of what errors, |
| 2967 | + if any, should be retried. |
| 2968 | + timeout (float): The timeout for this request. |
| 2969 | + metadata (Sequence[Tuple[str, str]]): Strings which should be |
| 2970 | + sent along with the request as metadata. |
| 2971 | + Returns: |
| 2972 | + None |
| 2973 | + """ |
| 2974 | + # Create or coerce a protobuf request object. |
| 2975 | + # The request isn't a proto-plus wrapped type, |
| 2976 | + # so it must be constructed via keyword expansion. |
| 2977 | + if isinstance(request, dict): |
| 2978 | + request = operations_pb2.CancelOperationRequest(**request) |
| 2979 | + |
| 2980 | + # Wrap the RPC method; this adds retry and timeout information, |
| 2981 | + # and friendly error handling. |
| 2982 | + rpc = gapic_v1.method.wrap_method( |
| 2983 | + self._client._transport.cancel_operation, |
| 2984 | + default_timeout=None, |
| 2985 | + client_info=DEFAULT_CLIENT_INFO, |
| 2986 | + ) |
| 2987 | + |
| 2988 | + # Certain fields should be provided within the metadata header; |
| 2989 | + # add these here. |
| 2990 | + metadata = tuple(metadata) + ( |
| 2991 | + gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)), |
| 2992 | + ) |
| 2993 | + |
| 2994 | + # Send the request. |
| 2995 | + await rpc( |
| 2996 | + request, |
| 2997 | + retry=retry, |
| 2998 | + timeout=timeout, |
| 2999 | + metadata=metadata, |
| 3000 | + ) |
| 3001 | + |
| 3002 | + async def get_location( |
| 3003 | + self, |
| 3004 | + request: locations_pb2.GetLocationRequest = None, |
| 3005 | + *, |
| 3006 | + retry: OptionalRetry = gapic_v1.method.DEFAULT, |
| 3007 | + timeout: float = None, |
| 3008 | + metadata: Sequence[Tuple[str, str]] = (), |
| 3009 | + ) -> locations_pb2.Location: |
| 3010 | + r"""Gets information about a location. |
| 3011 | +
|
| 3012 | + Args: |
| 3013 | + request (:class:`~.location_pb2.GetLocationRequest`): |
| 3014 | + The request object. Request message for |
| 3015 | + `GetLocation` method. |
| 3016 | + retry (google.api_core.retry.Retry): Designation of what errors, |
| 3017 | + if any, should be retried. |
| 3018 | + timeout (float): The timeout for this request. |
| 3019 | + metadata (Sequence[Tuple[str, str]]): Strings which should be |
| 3020 | + sent along with the request as metadata. |
| 3021 | + Returns: |
| 3022 | + ~.location_pb2.Location: |
| 3023 | + Location object. |
| 3024 | + """ |
| 3025 | + # Create or coerce a protobuf request object. |
| 3026 | + # The request isn't a proto-plus wrapped type, |
| 3027 | + # so it must be constructed via keyword expansion. |
| 3028 | + if isinstance(request, dict): |
| 3029 | + request = locations_pb2.GetLocationRequest(**request) |
| 3030 | + |
| 3031 | + # Wrap the RPC method; this adds retry and timeout information, |
| 3032 | + # and friendly error handling. |
| 3033 | + rpc = gapic_v1.method.wrap_method( |
| 3034 | + self._client._transport.get_location, |
| 3035 | + default_timeout=None, |
| 3036 | + client_info=DEFAULT_CLIENT_INFO, |
| 3037 | + ) |
| 3038 | + |
| 3039 | + # Certain fields should be provided within the metadata header; |
| 3040 | + # add these here. |
| 3041 | + metadata = tuple(metadata) + ( |
| 3042 | + gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)), |
| 3043 | + ) |
| 3044 | + |
| 3045 | + # Send the request. |
| 3046 | + response = await rpc( |
| 3047 | + request, |
| 3048 | + retry=retry, |
| 3049 | + timeout=timeout, |
| 3050 | + metadata=metadata, |
| 3051 | + ) |
| 3052 | + |
| 3053 | + # Done; return the response. |
| 3054 | + return response |
| 3055 | + |
| 3056 | + async def list_locations( |
| 3057 | + self, |
| 3058 | + request: locations_pb2.ListLocationsRequest = None, |
| 3059 | + *, |
| 3060 | + retry: OptionalRetry = gapic_v1.method.DEFAULT, |
| 3061 | + timeout: float = None, |
| 3062 | + metadata: Sequence[Tuple[str, str]] = (), |
| 3063 | + ) -> locations_pb2.ListLocationsResponse: |
| 3064 | + r"""Lists information about the supported locations for this service. |
| 3065 | +
|
| 3066 | + Args: |
| 3067 | + request (:class:`~.location_pb2.ListLocationsRequest`): |
| 3068 | + The request object. Request message for |
| 3069 | + `ListLocations` method. |
| 3070 | + retry (google.api_core.retry.Retry): Designation of what errors, |
| 3071 | + if any, should be retried. |
| 3072 | + timeout (float): The timeout for this request. |
| 3073 | + metadata (Sequence[Tuple[str, str]]): Strings which should be |
| 3074 | + sent along with the request as metadata. |
| 3075 | + Returns: |
| 3076 | + ~.location_pb2.ListLocationsResponse: |
| 3077 | + Response message for ``ListLocations`` method. |
| 3078 | + """ |
| 3079 | + # Create or coerce a protobuf request object. |
| 3080 | + # The request isn't a proto-plus wrapped type, |
| 3081 | + # so it must be constructed via keyword expansion. |
| 3082 | + if isinstance(request, dict): |
| 3083 | + request = locations_pb2.ListLocationsRequest(**request) |
| 3084 | + |
| 3085 | + # Wrap the RPC method; this adds retry and timeout information, |
| 3086 | + # and friendly error handling. |
| 3087 | + rpc = gapic_v1.method.wrap_method( |
| 3088 | + self._client._transport.list_locations, |
| 3089 | + default_timeout=None, |
| 3090 | + client_info=DEFAULT_CLIENT_INFO, |
| 3091 | + ) |
| 3092 | + |
| 3093 | + # Certain fields should be provided within the metadata header; |
| 3094 | + # add these here. |
| 3095 | + metadata = tuple(metadata) + ( |
| 3096 | + gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)), |
| 3097 | + ) |
| 3098 | + |
| 3099 | + # Send the request. |
| 3100 | + response = await rpc( |
| 3101 | + request, |
| 3102 | + retry=retry, |
| 3103 | + timeout=timeout, |
| 3104 | + metadata=metadata, |
| 3105 | + ) |
| 3106 | + |
| 3107 | + # Done; return the response. |
| 3108 | + return response |
| 3109 | + |
2795 | 3110 | async def __aenter__(self): |
2796 | 3111 | return self |
2797 | 3112 |
|
|
0 commit comments