1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219
|
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module VaultV1
# G Suite Vault API
#
# Archiving and eDiscovery for G Suite.
#
# @example
# require 'google/apis/vault_v1'
#
# Vault = Google::Apis::VaultV1 # Alias the module
# service = Vault::VaultService.new
#
# @see https://developers.google.com/vault
class VaultService < Google::Apis::Core::BaseService
# @return [String]
# API key. Your API key identifies your project and provides you with API access,
# quota, and reports. Required unless you provide an OAuth 2.0 token.
attr_accessor :key
# @return [String]
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
attr_accessor :quota_user
def initialize
super('https://vault.googleapis.com/', '')
@batch_path = 'batch'
end
# Adds an account as a matter collaborator.
# @param [String] matter_id
# The matter ID.
# @param [Google::Apis::VaultV1::AddMatterPermissionsRequest] add_matter_permissions_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VaultV1::MatterPermission] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VaultV1::MatterPermission]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def add_matter_permissions(matter_id, add_matter_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/matters/{matterId}:addPermissions', options)
command.request_representation = Google::Apis::VaultV1::AddMatterPermissionsRequest::Representation
command.request_object = add_matter_permissions_request_object
command.response_representation = Google::Apis::VaultV1::MatterPermission::Representation
command.response_class = Google::Apis::VaultV1::MatterPermission
command.params['matterId'] = matter_id unless matter_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Closes the specified matter. Returns matter with updated state.
# @param [String] matter_id
# The matter ID.
# @param [Google::Apis::VaultV1::CloseMatterRequest] close_matter_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VaultV1::CloseMatterResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VaultV1::CloseMatterResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def close_matter(matter_id, close_matter_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/matters/{matterId}:close', options)
command.request_representation = Google::Apis::VaultV1::CloseMatterRequest::Representation
command.request_object = close_matter_request_object
command.response_representation = Google::Apis::VaultV1::CloseMatterResponse::Representation
command.response_class = Google::Apis::VaultV1::CloseMatterResponse
command.params['matterId'] = matter_id unless matter_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Counts the artifacts within the context of a matter and returns a detailed
# breakdown of metrics.
# @param [String] matter_id
# The matter ID.
# @param [Google::Apis::VaultV1::CountArtifactsRequest] count_artifacts_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VaultV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VaultV1::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def count_matter_artifacts(matter_id, count_artifacts_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/matters/{matterId}:count', options)
command.request_representation = Google::Apis::VaultV1::CountArtifactsRequest::Representation
command.request_object = count_artifacts_request_object
command.response_representation = Google::Apis::VaultV1::Operation::Representation
command.response_class = Google::Apis::VaultV1::Operation
command.params['matterId'] = matter_id unless matter_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Creates a new matter with the given name and description. The initial state is
# open, and the owner is the method caller. Returns the created matter with
# default view.
# @param [Google::Apis::VaultV1::Matter] matter_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VaultV1::Matter] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VaultV1::Matter]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def create_matter(matter_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/matters', options)
command.request_representation = Google::Apis::VaultV1::Matter::Representation
command.request_object = matter_object
command.response_representation = Google::Apis::VaultV1::Matter::Representation
command.response_class = Google::Apis::VaultV1::Matter
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Deletes the specified matter. Returns matter with updated state.
# @param [String] matter_id
# The matter ID
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VaultV1::Matter] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VaultV1::Matter]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def delete_matter(matter_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1/matters/{matterId}', options)
command.response_representation = Google::Apis::VaultV1::Matter::Representation
command.response_class = Google::Apis::VaultV1::Matter
command.params['matterId'] = matter_id unless matter_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Gets the specified matter.
# @param [String] matter_id
# The matter ID.
# @param [String] view
# Specifies which parts of the Matter to return in the response.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VaultV1::Matter] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VaultV1::Matter]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_matter(matter_id, view: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/matters/{matterId}', options)
command.response_representation = Google::Apis::VaultV1::Matter::Representation
command.response_class = Google::Apis::VaultV1::Matter
command.params['matterId'] = matter_id unless matter_id.nil?
command.query['view'] = view unless view.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Lists matters the user has access to.
# @param [Fixnum] page_size
# The number of matters to return in the response. Default and maximum are 100.
# @param [String] page_token
# The pagination token as returned in the response.
# @param [String] state
# If set, list only matters with that specific state. The default is listing
# matters of all states.
# @param [String] view
# Specifies which parts of the matter to return in response.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VaultV1::ListMattersResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VaultV1::ListMattersResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_matters(page_size: nil, page_token: nil, state: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/matters', options)
command.response_representation = Google::Apis::VaultV1::ListMattersResponse::Representation
command.response_class = Google::Apis::VaultV1::ListMattersResponse
command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['state'] = state unless state.nil?
command.query['view'] = view unless view.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Removes an account as a matter collaborator.
# @param [String] matter_id
# The matter ID.
# @param [Google::Apis::VaultV1::RemoveMatterPermissionsRequest] remove_matter_permissions_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VaultV1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VaultV1::Empty]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def remove_matter_permissions(matter_id, remove_matter_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/matters/{matterId}:removePermissions', options)
command.request_representation = Google::Apis::VaultV1::RemoveMatterPermissionsRequest::Representation
command.request_object = remove_matter_permissions_request_object
command.response_representation = Google::Apis::VaultV1::Empty::Representation
command.response_class = Google::Apis::VaultV1::Empty
command.params['matterId'] = matter_id unless matter_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Reopens the specified matter. Returns matter with updated state.
# @param [String] matter_id
# The matter ID.
# @param [Google::Apis::VaultV1::ReopenMatterRequest] reopen_matter_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VaultV1::ReopenMatterResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VaultV1::ReopenMatterResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def reopen_matter(matter_id, reopen_matter_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/matters/{matterId}:reopen', options)
command.request_representation = Google::Apis::VaultV1::ReopenMatterRequest::Representation
command.request_object = reopen_matter_request_object
command.response_representation = Google::Apis::VaultV1::ReopenMatterResponse::Representation
command.response_class = Google::Apis::VaultV1::ReopenMatterResponse
command.params['matterId'] = matter_id unless matter_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Undeletes the specified matter. Returns matter with updated state.
# @param [String] matter_id
# The matter ID.
# @param [Google::Apis::VaultV1::UndeleteMatterRequest] undelete_matter_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VaultV1::Matter] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VaultV1::Matter]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def undelete_matter(matter_id, undelete_matter_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/matters/{matterId}:undelete', options)
command.request_representation = Google::Apis::VaultV1::UndeleteMatterRequest::Representation
command.request_object = undelete_matter_request_object
command.response_representation = Google::Apis::VaultV1::Matter::Representation
command.response_class = Google::Apis::VaultV1::Matter
command.params['matterId'] = matter_id unless matter_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Updates the specified matter. This updates only the name and description of
# the matter, identified by matter ID. Changes to any other fields are ignored.
# Returns the default view of the matter.
# @param [String] matter_id
# The matter ID.
# @param [Google::Apis::VaultV1::Matter] matter_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VaultV1::Matter] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VaultV1::Matter]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def update_matter(matter_id, matter_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:put, 'v1/matters/{matterId}', options)
command.request_representation = Google::Apis::VaultV1::Matter::Representation
command.request_object = matter_object
command.response_representation = Google::Apis::VaultV1::Matter::Representation
command.response_class = Google::Apis::VaultV1::Matter
command.params['matterId'] = matter_id unless matter_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Creates an Export.
# @param [String] matter_id
# The matter ID.
# @param [Google::Apis::VaultV1::Export] export_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VaultV1::Export] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VaultV1::Export]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def create_matter_export(matter_id, export_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/matters/{matterId}/exports', options)
command.request_representation = Google::Apis::VaultV1::Export::Representation
command.request_object = export_object
command.response_representation = Google::Apis::VaultV1::Export::Representation
command.response_class = Google::Apis::VaultV1::Export
command.params['matterId'] = matter_id unless matter_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Deletes an Export.
# @param [String] matter_id
# The matter ID.
# @param [String] export_id
# The export ID.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VaultV1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VaultV1::Empty]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def delete_matter_export(matter_id, export_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1/matters/{matterId}/exports/{exportId}', options)
command.response_representation = Google::Apis::VaultV1::Empty::Representation
command.response_class = Google::Apis::VaultV1::Empty
command.params['matterId'] = matter_id unless matter_id.nil?
command.params['exportId'] = export_id unless export_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Gets an Export.
# @param [String] matter_id
# The matter ID.
# @param [String] export_id
# The export ID.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VaultV1::Export] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VaultV1::Export]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_matter_export(matter_id, export_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/matters/{matterId}/exports/{exportId}', options)
command.response_representation = Google::Apis::VaultV1::Export::Representation
command.response_class = Google::Apis::VaultV1::Export
command.params['matterId'] = matter_id unless matter_id.nil?
command.params['exportId'] = export_id unless export_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Lists Exports.
# @param [String] matter_id
# The matter ID.
# @param [Fixnum] page_size
# The number of exports to return in the response.
# @param [String] page_token
# The pagination token as returned in the response.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VaultV1::ListExportsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VaultV1::ListExportsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_matter_exports(matter_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/matters/{matterId}/exports', options)
command.response_representation = Google::Apis::VaultV1::ListExportsResponse::Representation
command.response_class = Google::Apis::VaultV1::ListExportsResponse
command.params['matterId'] = matter_id unless matter_id.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Adds HeldAccounts to a hold. Returns a list of accounts that have been
# successfully added. Accounts can only be added to an existing account-based
# hold.
# @param [String] matter_id
# The matter ID.
# @param [String] hold_id
# The hold ID.
# @param [Google::Apis::VaultV1::AddHeldAccountsRequest] add_held_accounts_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VaultV1::AddHeldAccountsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VaultV1::AddHeldAccountsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def add_hold_held_accounts(matter_id, hold_id, add_held_accounts_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/matters/{matterId}/holds/{holdId}:addHeldAccounts', options)
command.request_representation = Google::Apis::VaultV1::AddHeldAccountsRequest::Representation
command.request_object = add_held_accounts_request_object
command.response_representation = Google::Apis::VaultV1::AddHeldAccountsResponse::Representation
command.response_class = Google::Apis::VaultV1::AddHeldAccountsResponse
command.params['matterId'] = matter_id unless matter_id.nil?
command.params['holdId'] = hold_id unless hold_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Creates a hold in the given matter.
# @param [String] matter_id
# The matter ID.
# @param [Google::Apis::VaultV1::Hold] hold_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VaultV1::Hold] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VaultV1::Hold]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def create_matter_hold(matter_id, hold_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/matters/{matterId}/holds', options)
command.request_representation = Google::Apis::VaultV1::Hold::Representation
command.request_object = hold_object
command.response_representation = Google::Apis::VaultV1::Hold::Representation
command.response_class = Google::Apis::VaultV1::Hold
command.params['matterId'] = matter_id unless matter_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Removes a hold by ID. This will release any HeldAccounts on this Hold.
# @param [String] matter_id
# The matter ID.
# @param [String] hold_id
# The hold ID.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VaultV1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VaultV1::Empty]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def delete_matter_hold(matter_id, hold_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1/matters/{matterId}/holds/{holdId}', options)
command.response_representation = Google::Apis::VaultV1::Empty::Representation
command.response_class = Google::Apis::VaultV1::Empty
command.params['matterId'] = matter_id unless matter_id.nil?
command.params['holdId'] = hold_id unless hold_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Gets a hold by ID.
# @param [String] matter_id
# The matter ID.
# @param [String] hold_id
# The hold ID.
# @param [String] view
# Specifies which parts of the Hold to return.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VaultV1::Hold] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VaultV1::Hold]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_matter_hold(matter_id, hold_id, view: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/matters/{matterId}/holds/{holdId}', options)
command.response_representation = Google::Apis::VaultV1::Hold::Representation
command.response_class = Google::Apis::VaultV1::Hold
command.params['matterId'] = matter_id unless matter_id.nil?
command.params['holdId'] = hold_id unless hold_id.nil?
command.query['view'] = view unless view.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Lists holds within a matter. An empty page token in ListHoldsResponse denotes
# no more holds to list.
# @param [String] matter_id
# The matter ID.
# @param [Fixnum] page_size
# The number of holds to return in the response, between 0 and 100 inclusive.
# Leaving this empty, or as 0, is the same as page_size = 100.
# @param [String] page_token
# The pagination token as returned in the response. An empty token means start
# from the beginning.
# @param [String] view
# Specifies which parts of the Hold to return.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VaultV1::ListHoldsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VaultV1::ListHoldsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_matter_holds(matter_id, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/matters/{matterId}/holds', options)
command.response_representation = Google::Apis::VaultV1::ListHoldsResponse::Representation
command.response_class = Google::Apis::VaultV1::ListHoldsResponse
command.params['matterId'] = matter_id unless matter_id.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['view'] = view unless view.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Removes HeldAccounts from a hold. Returns a list of statuses in the same order
# as the request. If this request leaves the hold with no held accounts, the
# hold will not apply to any accounts.
# @param [String] matter_id
# The matter ID.
# @param [String] hold_id
# The hold ID.
# @param [Google::Apis::VaultV1::RemoveHeldAccountsRequest] remove_held_accounts_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VaultV1::RemoveHeldAccountsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VaultV1::RemoveHeldAccountsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def remove_hold_held_accounts(matter_id, hold_id, remove_held_accounts_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/matters/{matterId}/holds/{holdId}:removeHeldAccounts', options)
command.request_representation = Google::Apis::VaultV1::RemoveHeldAccountsRequest::Representation
command.request_object = remove_held_accounts_request_object
command.response_representation = Google::Apis::VaultV1::RemoveHeldAccountsResponse::Representation
command.response_class = Google::Apis::VaultV1::RemoveHeldAccountsResponse
command.params['matterId'] = matter_id unless matter_id.nil?
command.params['holdId'] = hold_id unless hold_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Updates the OU and/or query parameters of a hold. You cannot add accounts to a
# hold that covers an OU, nor can you add OUs to a hold that covers individual
# accounts. Accounts listed in the hold will be ignored.
# @param [String] matter_id
# The matter ID.
# @param [String] hold_id
# The ID of the hold.
# @param [Google::Apis::VaultV1::Hold] hold_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VaultV1::Hold] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VaultV1::Hold]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def update_matter_hold(matter_id, hold_id, hold_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:put, 'v1/matters/{matterId}/holds/{holdId}', options)
command.request_representation = Google::Apis::VaultV1::Hold::Representation
command.request_object = hold_object
command.response_representation = Google::Apis::VaultV1::Hold::Representation
command.response_class = Google::Apis::VaultV1::Hold
command.params['matterId'] = matter_id unless matter_id.nil?
command.params['holdId'] = hold_id unless hold_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Adds a HeldAccount to a hold. Accounts can only be added to a hold that has no
# held_org_unit set. Attempting to add an account to an OU-based hold will
# result in an error.
# @param [String] matter_id
# The matter ID.
# @param [String] hold_id
# The hold ID.
# @param [Google::Apis::VaultV1::HeldAccount] held_account_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VaultV1::HeldAccount] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VaultV1::HeldAccount]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def create_matter_hold_account(matter_id, hold_id, held_account_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/matters/{matterId}/holds/{holdId}/accounts', options)
command.request_representation = Google::Apis::VaultV1::HeldAccount::Representation
command.request_object = held_account_object
command.response_representation = Google::Apis::VaultV1::HeldAccount::Representation
command.response_class = Google::Apis::VaultV1::HeldAccount
command.params['matterId'] = matter_id unless matter_id.nil?
command.params['holdId'] = hold_id unless hold_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Removes a HeldAccount from a hold. If this request leaves the hold with no
# held accounts, the hold will not apply to any accounts.
# @param [String] matter_id
# The matter ID.
# @param [String] hold_id
# The hold ID.
# @param [String] account_id
# The ID of the account to remove from the hold.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VaultV1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VaultV1::Empty]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def delete_matter_hold_account(matter_id, hold_id, account_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1/matters/{matterId}/holds/{holdId}/accounts/{accountId}', options)
command.response_representation = Google::Apis::VaultV1::Empty::Representation
command.response_class = Google::Apis::VaultV1::Empty
command.params['matterId'] = matter_id unless matter_id.nil?
command.params['holdId'] = hold_id unless hold_id.nil?
command.params['accountId'] = account_id unless account_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Lists HeldAccounts for a hold. This will only list individually specified held
# accounts. If the hold is on an OU, then use Admin SDK to enumerate its members.
# @param [String] matter_id
# The matter ID.
# @param [String] hold_id
# The hold ID.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VaultV1::ListHeldAccountsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VaultV1::ListHeldAccountsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_matter_hold_accounts(matter_id, hold_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/matters/{matterId}/holds/{holdId}/accounts', options)
command.response_representation = Google::Apis::VaultV1::ListHeldAccountsResponse::Representation
command.response_class = Google::Apis::VaultV1::ListHeldAccountsResponse
command.params['matterId'] = matter_id unless matter_id.nil?
command.params['holdId'] = hold_id unless hold_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Creates a saved query.
# @param [String] matter_id
# The matter ID of the parent matter for which the saved query is to be created.
# @param [Google::Apis::VaultV1::SavedQuery] saved_query_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VaultV1::SavedQuery] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VaultV1::SavedQuery]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def create_matter_saved_query(matter_id, saved_query_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/matters/{matterId}/savedQueries', options)
command.request_representation = Google::Apis::VaultV1::SavedQuery::Representation
command.request_object = saved_query_object
command.response_representation = Google::Apis::VaultV1::SavedQuery::Representation
command.response_class = Google::Apis::VaultV1::SavedQuery
command.params['matterId'] = matter_id unless matter_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Deletes a saved query by Id.
# @param [String] matter_id
# The matter ID of the parent matter for which the saved query is to be deleted.
# @param [String] saved_query_id
# ID of the saved query to be deleted.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VaultV1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VaultV1::Empty]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def delete_matter_saved_query(matter_id, saved_query_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1/matters/{matterId}/savedQueries/{savedQueryId}', options)
command.response_representation = Google::Apis::VaultV1::Empty::Representation
command.response_class = Google::Apis::VaultV1::Empty
command.params['matterId'] = matter_id unless matter_id.nil?
command.params['savedQueryId'] = saved_query_id unless saved_query_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves a saved query by Id.
# @param [String] matter_id
# The matter ID of the parent matter for which the saved query is to be
# retrieved.
# @param [String] saved_query_id
# ID of the saved query to be retrieved.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VaultV1::SavedQuery] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VaultV1::SavedQuery]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_matter_saved_query(matter_id, saved_query_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/matters/{matterId}/savedQueries/{savedQueryId}', options)
command.response_representation = Google::Apis::VaultV1::SavedQuery::Representation
command.response_class = Google::Apis::VaultV1::SavedQuery
command.params['matterId'] = matter_id unless matter_id.nil?
command.params['savedQueryId'] = saved_query_id unless saved_query_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Lists saved queries within a matter. An empty page token in
# ListSavedQueriesResponse denotes no more saved queries to list.
# @param [String] matter_id
# The matter ID of the parent matter for which the saved queries are to be
# retrieved.
# @param [Fixnum] page_size
# The maximum number of saved queries to return.
# @param [String] page_token
# The pagination token as returned in the previous response. An empty token
# means start from the beginning.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VaultV1::ListSavedQueriesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VaultV1::ListSavedQueriesResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_matter_saved_queries(matter_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/matters/{matterId}/savedQueries', options)
command.response_representation = Google::Apis::VaultV1::ListSavedQueriesResponse::Representation
command.response_class = Google::Apis::VaultV1::ListSavedQueriesResponse
command.params['matterId'] = matter_id unless matter_id.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Starts asynchronous cancellation on a long-running operation. The server makes
# a best effort to cancel the operation, but success is not guaranteed. If the
# server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
# Clients can use Operations.GetOperation or other methods to check whether the
# cancellation succeeded or whether the operation completed despite cancellation.
# On successful cancellation, the operation is not deleted; instead, it becomes
# an operation with an Operation.error value with a google.rpc.Status.code of 1,
# corresponding to `Code.CANCELLED`.
# @param [String] name
# The name of the operation resource to be cancelled.
# @param [Google::Apis::VaultV1::CancelOperationRequest] cancel_operation_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VaultV1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VaultV1::Empty]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+name}:cancel', options)
command.request_representation = Google::Apis::VaultV1::CancelOperationRequest::Representation
command.request_object = cancel_operation_request_object
command.response_representation = Google::Apis::VaultV1::Empty::Representation
command.response_class = Google::Apis::VaultV1::Empty
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Deletes a long-running operation. This method indicates that the client is no
# longer interested in the operation result. It does not cancel the operation.
# If the server doesn't support this method, it returns `google.rpc.Code.
# UNIMPLEMENTED`.
# @param [String] name
# The name of the operation resource to be deleted.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VaultV1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VaultV1::Empty]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def delete_operation(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1/{+name}', options)
command.response_representation = Google::Apis::VaultV1::Empty::Representation
command.response_class = Google::Apis::VaultV1::Empty
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Gets the latest state of a long-running operation. Clients can use this method
# to poll the operation result at intervals as recommended by the API service.
# @param [String] name
# The name of the operation resource.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VaultV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VaultV1::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::VaultV1::Operation::Representation
command.response_class = Google::Apis::VaultV1::Operation
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Lists operations that match the specified filter in the request. If the server
# doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
# binding allows API services to override the binding to use different resource
# name schemes, such as `users/*/operations`. To override the binding, API
# services can add a binding such as `"/v1/`name=users/*`/operations"` to their
# service configuration. For backwards compatibility, the default name includes
# the operations collection id, however overriding users must ensure the name
# binding is the parent resource, without the operations collection id.
# @param [String] name
# The name of the operation's parent resource.
# @param [String] filter
# The standard list filter.
# @param [Fixnum] page_size
# The standard list page size.
# @param [String] page_token
# The standard list page token.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VaultV1::ListOperationsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VaultV1::ListOperationsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::VaultV1::ListOperationsResponse::Representation
command.response_class = Google::Apis::VaultV1::ListOperationsResponse
command.params['name'] = name unless name.nil?
command.query['filter'] = filter unless filter.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
protected
def apply_command_defaults(command)
command.query['key'] = key unless key.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
end
end
end
end
end
|