google-cloud-memorystore-v1 1.10.0 → 1.11.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.
@@ -753,6 +753,326 @@ module Google
753
753
  end
754
754
  end
755
755
 
756
+ ##
757
+ # Baseline implementation for the list_token_auth_users REST call
758
+ #
759
+ # @param request_pb [::Google::Cloud::Memorystore::V1::ListTokenAuthUsersRequest]
760
+ # A request object representing the call parameters. Required.
761
+ # @param options [::Gapic::CallOptions]
762
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
763
+ #
764
+ # @yield [result, operation] Access the result along with the TransportOperation object
765
+ # @yieldparam result [::Google::Cloud::Memorystore::V1::ListTokenAuthUsersResponse]
766
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
767
+ #
768
+ # @return [::Google::Cloud::Memorystore::V1::ListTokenAuthUsersResponse]
769
+ # A result object deserialized from the server's reply
770
+ def list_token_auth_users request_pb, options = nil
771
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
772
+
773
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_token_auth_users_request request_pb
774
+ query_string_params = if query_string_params.any?
775
+ query_string_params.to_h { |p| p.split "=", 2 }
776
+ else
777
+ {}
778
+ end
779
+
780
+ response = @client_stub.make_http_request(
781
+ verb,
782
+ uri: uri,
783
+ body: body || "",
784
+ params: query_string_params,
785
+ method_name: "list_token_auth_users",
786
+ options: options
787
+ )
788
+ operation = ::Gapic::Rest::TransportOperation.new response
789
+ result = ::Google::Cloud::Memorystore::V1::ListTokenAuthUsersResponse.decode_json response.body, ignore_unknown_fields: true
790
+ catch :response do
791
+ yield result, operation if block_given?
792
+ result
793
+ end
794
+ end
795
+
796
+ ##
797
+ # Baseline implementation for the get_token_auth_user REST call
798
+ #
799
+ # @param request_pb [::Google::Cloud::Memorystore::V1::GetTokenAuthUserRequest]
800
+ # A request object representing the call parameters. Required.
801
+ # @param options [::Gapic::CallOptions]
802
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
803
+ #
804
+ # @yield [result, operation] Access the result along with the TransportOperation object
805
+ # @yieldparam result [::Google::Cloud::Memorystore::V1::TokenAuthUser]
806
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
807
+ #
808
+ # @return [::Google::Cloud::Memorystore::V1::TokenAuthUser]
809
+ # A result object deserialized from the server's reply
810
+ def get_token_auth_user request_pb, options = nil
811
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
812
+
813
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_token_auth_user_request request_pb
814
+ query_string_params = if query_string_params.any?
815
+ query_string_params.to_h { |p| p.split "=", 2 }
816
+ else
817
+ {}
818
+ end
819
+
820
+ response = @client_stub.make_http_request(
821
+ verb,
822
+ uri: uri,
823
+ body: body || "",
824
+ params: query_string_params,
825
+ method_name: "get_token_auth_user",
826
+ options: options
827
+ )
828
+ operation = ::Gapic::Rest::TransportOperation.new response
829
+ result = ::Google::Cloud::Memorystore::V1::TokenAuthUser.decode_json response.body, ignore_unknown_fields: true
830
+ catch :response do
831
+ yield result, operation if block_given?
832
+ result
833
+ end
834
+ end
835
+
836
+ ##
837
+ # Baseline implementation for the list_auth_tokens REST call
838
+ #
839
+ # @param request_pb [::Google::Cloud::Memorystore::V1::ListAuthTokensRequest]
840
+ # A request object representing the call parameters. Required.
841
+ # @param options [::Gapic::CallOptions]
842
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
843
+ #
844
+ # @yield [result, operation] Access the result along with the TransportOperation object
845
+ # @yieldparam result [::Google::Cloud::Memorystore::V1::ListAuthTokensResponse]
846
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
847
+ #
848
+ # @return [::Google::Cloud::Memorystore::V1::ListAuthTokensResponse]
849
+ # A result object deserialized from the server's reply
850
+ def list_auth_tokens request_pb, options = nil
851
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
852
+
853
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_auth_tokens_request request_pb
854
+ query_string_params = if query_string_params.any?
855
+ query_string_params.to_h { |p| p.split "=", 2 }
856
+ else
857
+ {}
858
+ end
859
+
860
+ response = @client_stub.make_http_request(
861
+ verb,
862
+ uri: uri,
863
+ body: body || "",
864
+ params: query_string_params,
865
+ method_name: "list_auth_tokens",
866
+ options: options
867
+ )
868
+ operation = ::Gapic::Rest::TransportOperation.new response
869
+ result = ::Google::Cloud::Memorystore::V1::ListAuthTokensResponse.decode_json response.body, ignore_unknown_fields: true
870
+ catch :response do
871
+ yield result, operation if block_given?
872
+ result
873
+ end
874
+ end
875
+
876
+ ##
877
+ # Baseline implementation for the get_auth_token REST call
878
+ #
879
+ # @param request_pb [::Google::Cloud::Memorystore::V1::GetAuthTokenRequest]
880
+ # A request object representing the call parameters. Required.
881
+ # @param options [::Gapic::CallOptions]
882
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
883
+ #
884
+ # @yield [result, operation] Access the result along with the TransportOperation object
885
+ # @yieldparam result [::Google::Cloud::Memorystore::V1::AuthToken]
886
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
887
+ #
888
+ # @return [::Google::Cloud::Memorystore::V1::AuthToken]
889
+ # A result object deserialized from the server's reply
890
+ def get_auth_token request_pb, options = nil
891
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
892
+
893
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_auth_token_request request_pb
894
+ query_string_params = if query_string_params.any?
895
+ query_string_params.to_h { |p| p.split "=", 2 }
896
+ else
897
+ {}
898
+ end
899
+
900
+ response = @client_stub.make_http_request(
901
+ verb,
902
+ uri: uri,
903
+ body: body || "",
904
+ params: query_string_params,
905
+ method_name: "get_auth_token",
906
+ options: options
907
+ )
908
+ operation = ::Gapic::Rest::TransportOperation.new response
909
+ result = ::Google::Cloud::Memorystore::V1::AuthToken.decode_json response.body, ignore_unknown_fields: true
910
+ catch :response do
911
+ yield result, operation if block_given?
912
+ result
913
+ end
914
+ end
915
+
916
+ ##
917
+ # Baseline implementation for the add_token_auth_user REST call
918
+ #
919
+ # @param request_pb [::Google::Cloud::Memorystore::V1::AddTokenAuthUserRequest]
920
+ # A request object representing the call parameters. Required.
921
+ # @param options [::Gapic::CallOptions]
922
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
923
+ #
924
+ # @yield [result, operation] Access the result along with the TransportOperation object
925
+ # @yieldparam result [::Google::Longrunning::Operation]
926
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
927
+ #
928
+ # @return [::Google::Longrunning::Operation]
929
+ # A result object deserialized from the server's reply
930
+ def add_token_auth_user request_pb, options = nil
931
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
932
+
933
+ verb, uri, query_string_params, body = ServiceStub.transcode_add_token_auth_user_request request_pb
934
+ query_string_params = if query_string_params.any?
935
+ query_string_params.to_h { |p| p.split "=", 2 }
936
+ else
937
+ {}
938
+ end
939
+
940
+ response = @client_stub.make_http_request(
941
+ verb,
942
+ uri: uri,
943
+ body: body || "",
944
+ params: query_string_params,
945
+ method_name: "add_token_auth_user",
946
+ options: options
947
+ )
948
+ operation = ::Gapic::Rest::TransportOperation.new response
949
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
950
+ catch :response do
951
+ yield result, operation if block_given?
952
+ result
953
+ end
954
+ end
955
+
956
+ ##
957
+ # Baseline implementation for the delete_token_auth_user REST call
958
+ #
959
+ # @param request_pb [::Google::Cloud::Memorystore::V1::DeleteTokenAuthUserRequest]
960
+ # A request object representing the call parameters. Required.
961
+ # @param options [::Gapic::CallOptions]
962
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
963
+ #
964
+ # @yield [result, operation] Access the result along with the TransportOperation object
965
+ # @yieldparam result [::Google::Longrunning::Operation]
966
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
967
+ #
968
+ # @return [::Google::Longrunning::Operation]
969
+ # A result object deserialized from the server's reply
970
+ def delete_token_auth_user request_pb, options = nil
971
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
972
+
973
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_token_auth_user_request request_pb
974
+ query_string_params = if query_string_params.any?
975
+ query_string_params.to_h { |p| p.split "=", 2 }
976
+ else
977
+ {}
978
+ end
979
+
980
+ response = @client_stub.make_http_request(
981
+ verb,
982
+ uri: uri,
983
+ body: body || "",
984
+ params: query_string_params,
985
+ method_name: "delete_token_auth_user",
986
+ options: options
987
+ )
988
+ operation = ::Gapic::Rest::TransportOperation.new response
989
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
990
+ catch :response do
991
+ yield result, operation if block_given?
992
+ result
993
+ end
994
+ end
995
+
996
+ ##
997
+ # Baseline implementation for the add_auth_token REST call
998
+ #
999
+ # @param request_pb [::Google::Cloud::Memorystore::V1::AddAuthTokenRequest]
1000
+ # A request object representing the call parameters. Required.
1001
+ # @param options [::Gapic::CallOptions]
1002
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1003
+ #
1004
+ # @yield [result, operation] Access the result along with the TransportOperation object
1005
+ # @yieldparam result [::Google::Longrunning::Operation]
1006
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1007
+ #
1008
+ # @return [::Google::Longrunning::Operation]
1009
+ # A result object deserialized from the server's reply
1010
+ def add_auth_token request_pb, options = nil
1011
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1012
+
1013
+ verb, uri, query_string_params, body = ServiceStub.transcode_add_auth_token_request request_pb
1014
+ query_string_params = if query_string_params.any?
1015
+ query_string_params.to_h { |p| p.split "=", 2 }
1016
+ else
1017
+ {}
1018
+ end
1019
+
1020
+ response = @client_stub.make_http_request(
1021
+ verb,
1022
+ uri: uri,
1023
+ body: body || "",
1024
+ params: query_string_params,
1025
+ method_name: "add_auth_token",
1026
+ options: options
1027
+ )
1028
+ operation = ::Gapic::Rest::TransportOperation.new response
1029
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
1030
+ catch :response do
1031
+ yield result, operation if block_given?
1032
+ result
1033
+ end
1034
+ end
1035
+
1036
+ ##
1037
+ # Baseline implementation for the delete_auth_token REST call
1038
+ #
1039
+ # @param request_pb [::Google::Cloud::Memorystore::V1::DeleteAuthTokenRequest]
1040
+ # A request object representing the call parameters. Required.
1041
+ # @param options [::Gapic::CallOptions]
1042
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1043
+ #
1044
+ # @yield [result, operation] Access the result along with the TransportOperation object
1045
+ # @yieldparam result [::Google::Longrunning::Operation]
1046
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1047
+ #
1048
+ # @return [::Google::Longrunning::Operation]
1049
+ # A result object deserialized from the server's reply
1050
+ def delete_auth_token request_pb, options = nil
1051
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1052
+
1053
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_auth_token_request request_pb
1054
+ query_string_params = if query_string_params.any?
1055
+ query_string_params.to_h { |p| p.split "=", 2 }
1056
+ else
1057
+ {}
1058
+ end
1059
+
1060
+ response = @client_stub.make_http_request(
1061
+ verb,
1062
+ uri: uri,
1063
+ body: body || "",
1064
+ params: query_string_params,
1065
+ method_name: "delete_auth_token",
1066
+ options: options
1067
+ )
1068
+ operation = ::Gapic::Rest::TransportOperation.new response
1069
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
1070
+ catch :response do
1071
+ yield result, operation if block_given?
1072
+ result
1073
+ end
1074
+ end
1075
+
756
1076
  ##
757
1077
  # @private
758
1078
  #
@@ -1116,6 +1436,176 @@ module Google
1116
1436
  )
1117
1437
  transcoder.transcode request_pb
1118
1438
  end
1439
+
1440
+ ##
1441
+ # @private
1442
+ #
1443
+ # GRPC transcoding helper method for the list_token_auth_users REST call
1444
+ #
1445
+ # @param request_pb [::Google::Cloud::Memorystore::V1::ListTokenAuthUsersRequest]
1446
+ # A request object representing the call parameters. Required.
1447
+ # @return [Array(String, [String, nil], Hash{String => String})]
1448
+ # Uri, Body, Query string parameters
1449
+ def self.transcode_list_token_auth_users_request request_pb
1450
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1451
+ .with_bindings(
1452
+ uri_method: :get,
1453
+ uri_template: "/v1/{parent}/tokenAuthUsers",
1454
+ matches: [
1455
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false]
1456
+ ]
1457
+ )
1458
+ transcoder.transcode request_pb
1459
+ end
1460
+
1461
+ ##
1462
+ # @private
1463
+ #
1464
+ # GRPC transcoding helper method for the get_token_auth_user REST call
1465
+ #
1466
+ # @param request_pb [::Google::Cloud::Memorystore::V1::GetTokenAuthUserRequest]
1467
+ # A request object representing the call parameters. Required.
1468
+ # @return [Array(String, [String, nil], Hash{String => String})]
1469
+ # Uri, Body, Query string parameters
1470
+ def self.transcode_get_token_auth_user_request request_pb
1471
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1472
+ .with_bindings(
1473
+ uri_method: :get,
1474
+ uri_template: "/v1/{name}",
1475
+ matches: [
1476
+ ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/tokenAuthUsers/[^/]+/?$}, false]
1477
+ ]
1478
+ )
1479
+ transcoder.transcode request_pb
1480
+ end
1481
+
1482
+ ##
1483
+ # @private
1484
+ #
1485
+ # GRPC transcoding helper method for the list_auth_tokens REST call
1486
+ #
1487
+ # @param request_pb [::Google::Cloud::Memorystore::V1::ListAuthTokensRequest]
1488
+ # A request object representing the call parameters. Required.
1489
+ # @return [Array(String, [String, nil], Hash{String => String})]
1490
+ # Uri, Body, Query string parameters
1491
+ def self.transcode_list_auth_tokens_request request_pb
1492
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1493
+ .with_bindings(
1494
+ uri_method: :get,
1495
+ uri_template: "/v1/{parent}/authTokens",
1496
+ matches: [
1497
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/tokenAuthUsers/[^/]+/?$}, false]
1498
+ ]
1499
+ )
1500
+ transcoder.transcode request_pb
1501
+ end
1502
+
1503
+ ##
1504
+ # @private
1505
+ #
1506
+ # GRPC transcoding helper method for the get_auth_token REST call
1507
+ #
1508
+ # @param request_pb [::Google::Cloud::Memorystore::V1::GetAuthTokenRequest]
1509
+ # A request object representing the call parameters. Required.
1510
+ # @return [Array(String, [String, nil], Hash{String => String})]
1511
+ # Uri, Body, Query string parameters
1512
+ def self.transcode_get_auth_token_request request_pb
1513
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1514
+ .with_bindings(
1515
+ uri_method: :get,
1516
+ uri_template: "/v1/{name}",
1517
+ matches: [
1518
+ ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/tokenAuthUsers/[^/]+/authTokens/[^/]+/?$}, false]
1519
+ ]
1520
+ )
1521
+ transcoder.transcode request_pb
1522
+ end
1523
+
1524
+ ##
1525
+ # @private
1526
+ #
1527
+ # GRPC transcoding helper method for the add_token_auth_user REST call
1528
+ #
1529
+ # @param request_pb [::Google::Cloud::Memorystore::V1::AddTokenAuthUserRequest]
1530
+ # A request object representing the call parameters. Required.
1531
+ # @return [Array(String, [String, nil], Hash{String => String})]
1532
+ # Uri, Body, Query string parameters
1533
+ def self.transcode_add_token_auth_user_request request_pb
1534
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1535
+ .with_bindings(
1536
+ uri_method: :post,
1537
+ uri_template: "/v1/{instance}:addTokenAuthUser",
1538
+ body: "*",
1539
+ matches: [
1540
+ ["instance", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false]
1541
+ ]
1542
+ )
1543
+ transcoder.transcode request_pb
1544
+ end
1545
+
1546
+ ##
1547
+ # @private
1548
+ #
1549
+ # GRPC transcoding helper method for the delete_token_auth_user REST call
1550
+ #
1551
+ # @param request_pb [::Google::Cloud::Memorystore::V1::DeleteTokenAuthUserRequest]
1552
+ # A request object representing the call parameters. Required.
1553
+ # @return [Array(String, [String, nil], Hash{String => String})]
1554
+ # Uri, Body, Query string parameters
1555
+ def self.transcode_delete_token_auth_user_request request_pb
1556
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1557
+ .with_bindings(
1558
+ uri_method: :delete,
1559
+ uri_template: "/v1/{name}",
1560
+ matches: [
1561
+ ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/tokenAuthUsers/[^/]+/?$}, false]
1562
+ ]
1563
+ )
1564
+ transcoder.transcode request_pb
1565
+ end
1566
+
1567
+ ##
1568
+ # @private
1569
+ #
1570
+ # GRPC transcoding helper method for the add_auth_token REST call
1571
+ #
1572
+ # @param request_pb [::Google::Cloud::Memorystore::V1::AddAuthTokenRequest]
1573
+ # A request object representing the call parameters. Required.
1574
+ # @return [Array(String, [String, nil], Hash{String => String})]
1575
+ # Uri, Body, Query string parameters
1576
+ def self.transcode_add_auth_token_request request_pb
1577
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1578
+ .with_bindings(
1579
+ uri_method: :post,
1580
+ uri_template: "/v1/{token_auth_user}:addAuthToken",
1581
+ body: "*",
1582
+ matches: [
1583
+ ["token_auth_user", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/tokenAuthUsers/[^/]+/?$}, false]
1584
+ ]
1585
+ )
1586
+ transcoder.transcode request_pb
1587
+ end
1588
+
1589
+ ##
1590
+ # @private
1591
+ #
1592
+ # GRPC transcoding helper method for the delete_auth_token REST call
1593
+ #
1594
+ # @param request_pb [::Google::Cloud::Memorystore::V1::DeleteAuthTokenRequest]
1595
+ # A request object representing the call parameters. Required.
1596
+ # @return [Array(String, [String, nil], Hash{String => String})]
1597
+ # Uri, Body, Query string parameters
1598
+ def self.transcode_delete_auth_token_request request_pb
1599
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1600
+ .with_bindings(
1601
+ uri_method: :delete,
1602
+ uri_template: "/v1/{name}",
1603
+ matches: [
1604
+ ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/tokenAuthUsers/[^/]+/authTokens/[^/]+/?$}, false]
1605
+ ]
1606
+ )
1607
+ transcoder.transcode request_pb
1608
+ end
1119
1609
  end
1120
1610
  end
1121
1611
  end