1"""Generated client library for policysimulator version v1beta1.""" 2# NOTE: This file is autogenerated and should not be edited by hand. 3 4from __future__ import absolute_import 5 6from apitools.base.py import base_api 7from googlecloudsdk.third_party.apis.policysimulator.v1beta1 import policysimulator_v1beta1_messages as messages 8 9 10class PolicysimulatorV1beta1(base_api.BaseApiClient): 11 """Generated client library for service policysimulator version v1beta1.""" 12 13 MESSAGES_MODULE = messages 14 BASE_URL = 'https://policysimulator.googleapis.com/' 15 MTLS_BASE_URL = 'https://policysimulator.mtls.googleapis.com/' 16 17 _PACKAGE = 'policysimulator' 18 _SCOPES = ['https://www.googleapis.com/auth/cloud-platform'] 19 _VERSION = 'v1beta1' 20 _CLIENT_ID = '1042881264118.apps.googleusercontent.com' 21 _CLIENT_SECRET = 'x_Tw5K8nnjoRAqULM9PFAC2b' 22 _USER_AGENT = 'google-cloud-sdk' 23 _CLIENT_CLASS_NAME = 'PolicysimulatorV1beta1' 24 _URL_VERSION = 'v1beta1' 25 _API_KEY = None 26 27 def __init__(self, url='', credentials=None, 28 get_credentials=True, http=None, model=None, 29 log_request=False, log_response=False, 30 credentials_args=None, default_global_params=None, 31 additional_http_headers=None, response_encoding=None): 32 """Create a new policysimulator handle.""" 33 url = url or self.BASE_URL 34 super(PolicysimulatorV1beta1, self).__init__( 35 url, credentials=credentials, 36 get_credentials=get_credentials, http=http, model=model, 37 log_request=log_request, log_response=log_response, 38 credentials_args=credentials_args, 39 default_global_params=default_global_params, 40 additional_http_headers=additional_http_headers, 41 response_encoding=response_encoding) 42 self.folders_locations_replays_results = self.FoldersLocationsReplaysResultsService(self) 43 self.folders_locations_replays = self.FoldersLocationsReplaysService(self) 44 self.folders_locations = self.FoldersLocationsService(self) 45 self.folders = self.FoldersService(self) 46 self.operations = self.OperationsService(self) 47 self.organizations_locations_replays_results = self.OrganizationsLocationsReplaysResultsService(self) 48 self.organizations_locations_replays = self.OrganizationsLocationsReplaysService(self) 49 self.organizations_locations = self.OrganizationsLocationsService(self) 50 self.organizations = self.OrganizationsService(self) 51 self.projects_locations_replays_results = self.ProjectsLocationsReplaysResultsService(self) 52 self.projects_locations_replays = self.ProjectsLocationsReplaysService(self) 53 self.projects_locations = self.ProjectsLocationsService(self) 54 self.projects = self.ProjectsService(self) 55 56 class FoldersLocationsReplaysResultsService(base_api.BaseApiService): 57 """Service class for the folders_locations_replays_results resource.""" 58 59 _NAME = 'folders_locations_replays_results' 60 61 def __init__(self, client): 62 super(PolicysimulatorV1beta1.FoldersLocationsReplaysResultsService, self).__init__(client) 63 self._upload_configs = { 64 } 65 66 def List(self, request, global_params=None): 67 r"""Lists the results of running a Replay. 68 69 Args: 70 request: (PolicysimulatorFoldersLocationsReplaysResultsListRequest) input message 71 global_params: (StandardQueryParameters, default: None) global arguments 72 Returns: 73 (GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse) The response message. 74 """ 75 config = self.GetMethodConfig('List') 76 return self._RunMethod( 77 config, request, global_params=global_params) 78 79 List.method_config = lambda: base_api.ApiMethodInfo( 80 flat_path='v1beta1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/results', 81 http_method='GET', 82 method_id='policysimulator.folders.locations.replays.results.list', 83 ordered_params=['parent'], 84 path_params=['parent'], 85 query_params=['pageSize', 'pageToken'], 86 relative_path='v1beta1/{+parent}/results', 87 request_field='', 88 request_type_name='PolicysimulatorFoldersLocationsReplaysResultsListRequest', 89 response_type_name='GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse', 90 supports_download=False, 91 ) 92 93 class FoldersLocationsReplaysService(base_api.BaseApiService): 94 """Service class for the folders_locations_replays resource.""" 95 96 _NAME = 'folders_locations_replays' 97 98 def __init__(self, client): 99 super(PolicysimulatorV1beta1.FoldersLocationsReplaysService, self).__init__(client) 100 self._upload_configs = { 101 } 102 103 def Create(self, request, global_params=None): 104 r"""Creates and starts a Replay using the given ReplayConfig. 105 106 Args: 107 request: (PolicysimulatorFoldersLocationsReplaysCreateRequest) input message 108 global_params: (StandardQueryParameters, default: None) global arguments 109 Returns: 110 (GoogleLongrunningOperation) The response message. 111 """ 112 config = self.GetMethodConfig('Create') 113 return self._RunMethod( 114 config, request, global_params=global_params) 115 116 Create.method_config = lambda: base_api.ApiMethodInfo( 117 flat_path='v1beta1/folders/{foldersId}/locations/{locationsId}/replays', 118 http_method='POST', 119 method_id='policysimulator.folders.locations.replays.create', 120 ordered_params=['parent'], 121 path_params=['parent'], 122 query_params=[], 123 relative_path='v1beta1/{+parent}/replays', 124 request_field='googleCloudPolicysimulatorV1beta1Replay', 125 request_type_name='PolicysimulatorFoldersLocationsReplaysCreateRequest', 126 response_type_name='GoogleLongrunningOperation', 127 supports_download=False, 128 ) 129 130 def Get(self, request, global_params=None): 131 r"""Gets the specified Replay. Each `Replay` is available for at least 7 days. 132 133 Args: 134 request: (PolicysimulatorFoldersLocationsReplaysGetRequest) input message 135 global_params: (StandardQueryParameters, default: None) global arguments 136 Returns: 137 (GoogleCloudPolicysimulatorV1beta1Replay) The response message. 138 """ 139 config = self.GetMethodConfig('Get') 140 return self._RunMethod( 141 config, request, global_params=global_params) 142 143 Get.method_config = lambda: base_api.ApiMethodInfo( 144 flat_path='v1beta1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}', 145 http_method='GET', 146 method_id='policysimulator.folders.locations.replays.get', 147 ordered_params=['name'], 148 path_params=['name'], 149 query_params=[], 150 relative_path='v1beta1/{+name}', 151 request_field='', 152 request_type_name='PolicysimulatorFoldersLocationsReplaysGetRequest', 153 response_type_name='GoogleCloudPolicysimulatorV1beta1Replay', 154 supports_download=False, 155 ) 156 157 class FoldersLocationsService(base_api.BaseApiService): 158 """Service class for the folders_locations resource.""" 159 160 _NAME = 'folders_locations' 161 162 def __init__(self, client): 163 super(PolicysimulatorV1beta1.FoldersLocationsService, self).__init__(client) 164 self._upload_configs = { 165 } 166 167 class FoldersService(base_api.BaseApiService): 168 """Service class for the folders resource.""" 169 170 _NAME = 'folders' 171 172 def __init__(self, client): 173 super(PolicysimulatorV1beta1.FoldersService, self).__init__(client) 174 self._upload_configs = { 175 } 176 177 class OperationsService(base_api.BaseApiService): 178 """Service class for the operations resource.""" 179 180 _NAME = 'operations' 181 182 def __init__(self, client): 183 super(PolicysimulatorV1beta1.OperationsService, self).__init__(client) 184 self._upload_configs = { 185 } 186 187 def Get(self, request, global_params=None): 188 r"""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. 189 190 Args: 191 request: (PolicysimulatorOperationsGetRequest) input message 192 global_params: (StandardQueryParameters, default: None) global arguments 193 Returns: 194 (GoogleLongrunningOperation) The response message. 195 """ 196 config = self.GetMethodConfig('Get') 197 return self._RunMethod( 198 config, request, global_params=global_params) 199 200 Get.method_config = lambda: base_api.ApiMethodInfo( 201 flat_path='v1beta1/operations/{operationsId}', 202 http_method='GET', 203 method_id='policysimulator.operations.get', 204 ordered_params=['name'], 205 path_params=['name'], 206 query_params=[], 207 relative_path='v1beta1/{+name}', 208 request_field='', 209 request_type_name='PolicysimulatorOperationsGetRequest', 210 response_type_name='GoogleLongrunningOperation', 211 supports_download=False, 212 ) 213 214 def List(self, request, global_params=None): 215 r"""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. 216 217 Args: 218 request: (PolicysimulatorOperationsListRequest) input message 219 global_params: (StandardQueryParameters, default: None) global arguments 220 Returns: 221 (GoogleLongrunningListOperationsResponse) The response message. 222 """ 223 config = self.GetMethodConfig('List') 224 return self._RunMethod( 225 config, request, global_params=global_params) 226 227 List.method_config = lambda: base_api.ApiMethodInfo( 228 http_method='GET', 229 method_id='policysimulator.operations.list', 230 ordered_params=[], 231 path_params=[], 232 query_params=['filter', 'name', 'pageSize', 'pageToken'], 233 relative_path='v1beta1/operations', 234 request_field='', 235 request_type_name='PolicysimulatorOperationsListRequest', 236 response_type_name='GoogleLongrunningListOperationsResponse', 237 supports_download=False, 238 ) 239 240 class OrganizationsLocationsReplaysResultsService(base_api.BaseApiService): 241 """Service class for the organizations_locations_replays_results resource.""" 242 243 _NAME = 'organizations_locations_replays_results' 244 245 def __init__(self, client): 246 super(PolicysimulatorV1beta1.OrganizationsLocationsReplaysResultsService, self).__init__(client) 247 self._upload_configs = { 248 } 249 250 def List(self, request, global_params=None): 251 r"""Lists the results of running a Replay. 252 253 Args: 254 request: (PolicysimulatorOrganizationsLocationsReplaysResultsListRequest) input message 255 global_params: (StandardQueryParameters, default: None) global arguments 256 Returns: 257 (GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse) The response message. 258 """ 259 config = self.GetMethodConfig('List') 260 return self._RunMethod( 261 config, request, global_params=global_params) 262 263 List.method_config = lambda: base_api.ApiMethodInfo( 264 flat_path='v1beta1/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/results', 265 http_method='GET', 266 method_id='policysimulator.organizations.locations.replays.results.list', 267 ordered_params=['parent'], 268 path_params=['parent'], 269 query_params=['pageSize', 'pageToken'], 270 relative_path='v1beta1/{+parent}/results', 271 request_field='', 272 request_type_name='PolicysimulatorOrganizationsLocationsReplaysResultsListRequest', 273 response_type_name='GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse', 274 supports_download=False, 275 ) 276 277 class OrganizationsLocationsReplaysService(base_api.BaseApiService): 278 """Service class for the organizations_locations_replays resource.""" 279 280 _NAME = 'organizations_locations_replays' 281 282 def __init__(self, client): 283 super(PolicysimulatorV1beta1.OrganizationsLocationsReplaysService, self).__init__(client) 284 self._upload_configs = { 285 } 286 287 def Create(self, request, global_params=None): 288 r"""Creates and starts a Replay using the given ReplayConfig. 289 290 Args: 291 request: (PolicysimulatorOrganizationsLocationsReplaysCreateRequest) input message 292 global_params: (StandardQueryParameters, default: None) global arguments 293 Returns: 294 (GoogleLongrunningOperation) The response message. 295 """ 296 config = self.GetMethodConfig('Create') 297 return self._RunMethod( 298 config, request, global_params=global_params) 299 300 Create.method_config = lambda: base_api.ApiMethodInfo( 301 flat_path='v1beta1/organizations/{organizationsId}/locations/{locationsId}/replays', 302 http_method='POST', 303 method_id='policysimulator.organizations.locations.replays.create', 304 ordered_params=['parent'], 305 path_params=['parent'], 306 query_params=[], 307 relative_path='v1beta1/{+parent}/replays', 308 request_field='googleCloudPolicysimulatorV1beta1Replay', 309 request_type_name='PolicysimulatorOrganizationsLocationsReplaysCreateRequest', 310 response_type_name='GoogleLongrunningOperation', 311 supports_download=False, 312 ) 313 314 def Get(self, request, global_params=None): 315 r"""Gets the specified Replay. Each `Replay` is available for at least 7 days. 316 317 Args: 318 request: (PolicysimulatorOrganizationsLocationsReplaysGetRequest) input message 319 global_params: (StandardQueryParameters, default: None) global arguments 320 Returns: 321 (GoogleCloudPolicysimulatorV1beta1Replay) The response message. 322 """ 323 config = self.GetMethodConfig('Get') 324 return self._RunMethod( 325 config, request, global_params=global_params) 326 327 Get.method_config = lambda: base_api.ApiMethodInfo( 328 flat_path='v1beta1/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}', 329 http_method='GET', 330 method_id='policysimulator.organizations.locations.replays.get', 331 ordered_params=['name'], 332 path_params=['name'], 333 query_params=[], 334 relative_path='v1beta1/{+name}', 335 request_field='', 336 request_type_name='PolicysimulatorOrganizationsLocationsReplaysGetRequest', 337 response_type_name='GoogleCloudPolicysimulatorV1beta1Replay', 338 supports_download=False, 339 ) 340 341 class OrganizationsLocationsService(base_api.BaseApiService): 342 """Service class for the organizations_locations resource.""" 343 344 _NAME = 'organizations_locations' 345 346 def __init__(self, client): 347 super(PolicysimulatorV1beta1.OrganizationsLocationsService, self).__init__(client) 348 self._upload_configs = { 349 } 350 351 class OrganizationsService(base_api.BaseApiService): 352 """Service class for the organizations resource.""" 353 354 _NAME = 'organizations' 355 356 def __init__(self, client): 357 super(PolicysimulatorV1beta1.OrganizationsService, self).__init__(client) 358 self._upload_configs = { 359 } 360 361 class ProjectsLocationsReplaysResultsService(base_api.BaseApiService): 362 """Service class for the projects_locations_replays_results resource.""" 363 364 _NAME = 'projects_locations_replays_results' 365 366 def __init__(self, client): 367 super(PolicysimulatorV1beta1.ProjectsLocationsReplaysResultsService, self).__init__(client) 368 self._upload_configs = { 369 } 370 371 def List(self, request, global_params=None): 372 r"""Lists the results of running a Replay. 373 374 Args: 375 request: (PolicysimulatorProjectsLocationsReplaysResultsListRequest) input message 376 global_params: (StandardQueryParameters, default: None) global arguments 377 Returns: 378 (GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse) The response message. 379 """ 380 config = self.GetMethodConfig('List') 381 return self._RunMethod( 382 config, request, global_params=global_params) 383 384 List.method_config = lambda: base_api.ApiMethodInfo( 385 flat_path='v1beta1/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/results', 386 http_method='GET', 387 method_id='policysimulator.projects.locations.replays.results.list', 388 ordered_params=['parent'], 389 path_params=['parent'], 390 query_params=['pageSize', 'pageToken'], 391 relative_path='v1beta1/{+parent}/results', 392 request_field='', 393 request_type_name='PolicysimulatorProjectsLocationsReplaysResultsListRequest', 394 response_type_name='GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse', 395 supports_download=False, 396 ) 397 398 class ProjectsLocationsReplaysService(base_api.BaseApiService): 399 """Service class for the projects_locations_replays resource.""" 400 401 _NAME = 'projects_locations_replays' 402 403 def __init__(self, client): 404 super(PolicysimulatorV1beta1.ProjectsLocationsReplaysService, self).__init__(client) 405 self._upload_configs = { 406 } 407 408 def Create(self, request, global_params=None): 409 r"""Creates and starts a Replay using the given ReplayConfig. 410 411 Args: 412 request: (PolicysimulatorProjectsLocationsReplaysCreateRequest) input message 413 global_params: (StandardQueryParameters, default: None) global arguments 414 Returns: 415 (GoogleLongrunningOperation) The response message. 416 """ 417 config = self.GetMethodConfig('Create') 418 return self._RunMethod( 419 config, request, global_params=global_params) 420 421 Create.method_config = lambda: base_api.ApiMethodInfo( 422 flat_path='v1beta1/projects/{projectsId}/locations/{locationsId}/replays', 423 http_method='POST', 424 method_id='policysimulator.projects.locations.replays.create', 425 ordered_params=['parent'], 426 path_params=['parent'], 427 query_params=[], 428 relative_path='v1beta1/{+parent}/replays', 429 request_field='googleCloudPolicysimulatorV1beta1Replay', 430 request_type_name='PolicysimulatorProjectsLocationsReplaysCreateRequest', 431 response_type_name='GoogleLongrunningOperation', 432 supports_download=False, 433 ) 434 435 def Get(self, request, global_params=None): 436 r"""Gets the specified Replay. Each `Replay` is available for at least 7 days. 437 438 Args: 439 request: (PolicysimulatorProjectsLocationsReplaysGetRequest) input message 440 global_params: (StandardQueryParameters, default: None) global arguments 441 Returns: 442 (GoogleCloudPolicysimulatorV1beta1Replay) The response message. 443 """ 444 config = self.GetMethodConfig('Get') 445 return self._RunMethod( 446 config, request, global_params=global_params) 447 448 Get.method_config = lambda: base_api.ApiMethodInfo( 449 flat_path='v1beta1/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}', 450 http_method='GET', 451 method_id='policysimulator.projects.locations.replays.get', 452 ordered_params=['name'], 453 path_params=['name'], 454 query_params=[], 455 relative_path='v1beta1/{+name}', 456 request_field='', 457 request_type_name='PolicysimulatorProjectsLocationsReplaysGetRequest', 458 response_type_name='GoogleCloudPolicysimulatorV1beta1Replay', 459 supports_download=False, 460 ) 461 462 class ProjectsLocationsService(base_api.BaseApiService): 463 """Service class for the projects_locations resource.""" 464 465 _NAME = 'projects_locations' 466 467 def __init__(self, client): 468 super(PolicysimulatorV1beta1.ProjectsLocationsService, self).__init__(client) 469 self._upload_configs = { 470 } 471 472 class ProjectsService(base_api.BaseApiService): 473 """Service class for the projects resource.""" 474 475 _NAME = 'projects' 476 477 def __init__(self, client): 478 super(PolicysimulatorV1beta1.ProjectsService, self).__init__(client) 479 self._upload_configs = { 480 } 481