| 1 | =begin comment | ||
| 2 | |||
| 3 | Fastly API | ||
| 4 | |||
| 5 | Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://www.fastly.com/documentation/reference/api/) | ||
| 6 | |||
| 7 | The version of the API Spec document: 1.0.0 | ||
| 8 | Contact: oss@fastly.com | ||
| 9 | |||
| 10 | =end comment | ||
| 11 | |||
| 12 | =cut | ||
| 13 | |||
| 14 | # | ||
| 15 | # NOTE: This class is auto generated. | ||
| 16 | # Do not edit the class manually. | ||
| 17 | # | ||
| 18 | package WebService::Fastly::DmRoutingConfigsApi; | ||
| 19 | |||
| 20 | require 5.6.0; | ||
| 21 | use strict; | ||
| 22 | use warnings; | ||
| 23 | use utf8; | ||
| 24 | use Exporter; | ||
| 25 | use Carp qw( croak ); | ||
| 26 | use Log::Any qw($log); | ||
| 27 | |||
| 28 | use WebService::Fastly::ApiClient; | ||
| 29 | |||
| 30 | use base "Class::Data::Inheritable"; | ||
| 31 | |||
| 32 | __PACKAGE__->mk_classdata('method_documentation' => {}); | ||
| 33 | |||
| 34 | sub new { | ||
| 35 | my $class = shift; | ||
| 36 | my $api_client; | ||
| 37 | |||
| 38 | if ($_[0] && ref $_[0] && ref $_[0] eq 'WebService::Fastly::ApiClient' ) { | ||
| 39 | $api_client = $_[0]; | ||
| 40 | } else { | ||
| 41 | $api_client = WebService::Fastly::ApiClient->new(@_); | ||
| 42 | } | ||
| 43 | |||
| 44 | bless { api_client => $api_client }, $class; | ||
| 45 | |||
| 46 | } | ||
| 47 | |||
| 48 | |||
| 49 | # | ||
| 50 | # activate_dm_routing_config_draft | ||
| 51 | # | ||
| 52 | # Activate the draft | ||
| 53 | # | ||
| 54 | # @param string $config_id (required) | ||
| 55 | { | ||
| 56 | my $params = { | ||
| 57 | 'config_id' => { | ||
| 58 | data_type => 'string', | ||
| 59 | description => '', | ||
| 60 | required => '1', | ||
| 61 | }, | ||
| 62 | }; | ||
| 63 | __PACKAGE__->method_documentation->{ 'activate_dm_routing_config_draft' } = { | ||
| 64 | summary => 'Activate the draft', | ||
| 65 | params => $params, | ||
| 66 | returns => 'RoutingConfigVersionResponse', | ||
| 67 | }; | ||
| 68 | } | ||
| 69 | # @return RoutingConfigVersionResponse | ||
| 70 | # | ||
| 71 | sub activate_dm_routing_config_draft { | ||
| 72 | my ($self, %args) = @_; | ||
| 73 | |||
| 74 | # verify the required parameter 'config_id' is set | ||
| 75 | unless (exists $args{'config_id'}) { | ||
| 76 | croak("Missing the required parameter 'config_id' when calling activate_dm_routing_config_draft"); | ||
| 77 | } | ||
| 78 | |||
| 79 | # parse inputs | ||
| 80 | my $_resource_path = '/domain-management/v1/routing-configs/{config_id}/activate'; | ||
| 81 | |||
| 82 | my $_method = 'POST'; | ||
| 83 | my $query_params = {}; | ||
| 84 | my $header_params = {}; | ||
| 85 | my $form_params = {}; | ||
| 86 | |||
| 87 | # 'Accept' and 'Content-Type' header | ||
| 88 | my $_header_accept = $self->{api_client}->select_header_accept('application/json'); | ||
| 89 | if ($_header_accept) { | ||
| 90 | $header_params->{'Accept'} = $_header_accept; | ||
| 91 | } | ||
| 92 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); | ||
| 93 | |||
| 94 | # path params | ||
| 95 | if ( exists $args{'config_id'}) { | ||
| 96 | my $_base_variable = "{" . "config_id" . "}"; | ||
| 97 | my $_base_value = $self->{api_client}->to_path_value($args{'config_id'}); | ||
| 98 | $_resource_path =~ s/$_base_variable/$_base_value/g; | ||
| 99 | } | ||
| 100 | |||
| 101 | my $_body_data; | ||
| 102 | # authentication setting, if any | ||
| 103 | my $auth_settings = [qw(token )]; | ||
| 104 | |||
| 105 | # make the API Call | ||
| 106 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | ||
| 107 | $query_params, $form_params, | ||
| 108 | $header_params, $_body_data, $auth_settings); | ||
| 109 | if (!$response) { | ||
| 110 | return; | ||
| 111 | } | ||
| 112 | my $_response_object = $self->{api_client}->deserialize('RoutingConfigVersionResponse', $response); | ||
| 113 | return $_response_object; | ||
| 114 | } | ||
| 115 | |||
| 116 | # | ||
| 117 | # create_dm_routing_config | ||
| 118 | # | ||
| 119 | # Create a routing config | ||
| 120 | # | ||
| 121 | # @param RoutingConfig $routing_config (optional) | ||
| 122 | { | ||
| 123 | my $params = { | ||
| 124 | 'routing_config' => { | ||
| 125 | data_type => 'RoutingConfig', | ||
| 126 | description => '', | ||
| 127 | required => '0', | ||
| 128 | }, | ||
| 129 | }; | ||
| 130 | __PACKAGE__->method_documentation->{ 'create_dm_routing_config' } = { | ||
| 131 | summary => 'Create a routing config', | ||
| 132 | params => $params, | ||
| 133 | returns => 'RoutingConfigResponse', | ||
| 134 | }; | ||
| 135 | } | ||
| 136 | # @return RoutingConfigResponse | ||
| 137 | # | ||
| 138 | sub create_dm_routing_config { | ||
| 139 | my ($self, %args) = @_; | ||
| 140 | |||
| 141 | # parse inputs | ||
| 142 | my $_resource_path = '/domain-management/v1/routing-configs'; | ||
| 143 | |||
| 144 | my $_method = 'POST'; | ||
| 145 | my $query_params = {}; | ||
| 146 | my $header_params = {}; | ||
| 147 | my $form_params = {}; | ||
| 148 | |||
| 149 | # 'Accept' and 'Content-Type' header | ||
| 150 | my $_header_accept = $self->{api_client}->select_header_accept('application/json'); | ||
| 151 | if ($_header_accept) { | ||
| 152 | $header_params->{'Accept'} = $_header_accept; | ||
| 153 | } | ||
| 154 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); | ||
| 155 | |||
| 156 | my $_body_data; | ||
| 157 | # body params | ||
| 158 | if ( exists $args{'routing_config'}) { | ||
| 159 | $_body_data = $args{'routing_config'}; | ||
| 160 | } | ||
| 161 | |||
| 162 | # authentication setting, if any | ||
| 163 | my $auth_settings = [qw(token )]; | ||
| 164 | |||
| 165 | # make the API Call | ||
| 166 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | ||
| 167 | $query_params, $form_params, | ||
| 168 | $header_params, $_body_data, $auth_settings); | ||
| 169 | if (!$response) { | ||
| 170 | return; | ||
| 171 | } | ||
| 172 | my $_response_object = $self->{api_client}->deserialize('RoutingConfigResponse', $response); | ||
| 173 | return $_response_object; | ||
| 174 | } | ||
| 175 | |||
| 176 | # | ||
| 177 | # create_dm_routing_config_path | ||
| 178 | # | ||
| 179 | # Create a path | ||
| 180 | # | ||
| 181 | # @param string $config_id (required) | ||
| 182 | # @param PathCreate $path_create (optional) | ||
| 183 | { | ||
| 184 | my $params = { | ||
| 185 | 'config_id' => { | ||
| 186 | data_type => 'string', | ||
| 187 | description => '', | ||
| 188 | required => '1', | ||
| 189 | }, | ||
| 190 | 'path_create' => { | ||
| 191 | data_type => 'PathCreate', | ||
| 192 | description => '', | ||
| 193 | required => '0', | ||
| 194 | }, | ||
| 195 | }; | ||
| 196 | __PACKAGE__->method_documentation->{ 'create_dm_routing_config_path' } = { | ||
| 197 | summary => 'Create a path', | ||
| 198 | params => $params, | ||
| 199 | returns => 'PathResponse', | ||
| 200 | }; | ||
| 201 | } | ||
| 202 | # @return PathResponse | ||
| 203 | # | ||
| 204 | sub create_dm_routing_config_path { | ||
| 205 | my ($self, %args) = @_; | ||
| 206 | |||
| 207 | # verify the required parameter 'config_id' is set | ||
| 208 | unless (exists $args{'config_id'}) { | ||
| 209 | croak("Missing the required parameter 'config_id' when calling create_dm_routing_config_path"); | ||
| 210 | } | ||
| 211 | |||
| 212 | # parse inputs | ||
| 213 | my $_resource_path = '/domain-management/v1/routing-configs/{config_id}/paths'; | ||
| 214 | |||
| 215 | my $_method = 'POST'; | ||
| 216 | my $query_params = {}; | ||
| 217 | my $header_params = {}; | ||
| 218 | my $form_params = {}; | ||
| 219 | |||
| 220 | # 'Accept' and 'Content-Type' header | ||
| 221 | my $_header_accept = $self->{api_client}->select_header_accept('application/json'); | ||
| 222 | if ($_header_accept) { | ||
| 223 | $header_params->{'Accept'} = $_header_accept; | ||
| 224 | } | ||
| 225 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); | ||
| 226 | |||
| 227 | # path params | ||
| 228 | if ( exists $args{'config_id'}) { | ||
| 229 | my $_base_variable = "{" . "config_id" . "}"; | ||
| 230 | my $_base_value = $self->{api_client}->to_path_value($args{'config_id'}); | ||
| 231 | $_resource_path =~ s/$_base_variable/$_base_value/g; | ||
| 232 | } | ||
| 233 | |||
| 234 | my $_body_data; | ||
| 235 | # body params | ||
| 236 | if ( exists $args{'path_create'}) { | ||
| 237 | $_body_data = $args{'path_create'}; | ||
| 238 | } | ||
| 239 | |||
| 240 | # authentication setting, if any | ||
| 241 | my $auth_settings = [qw(token )]; | ||
| 242 | |||
| 243 | # make the API Call | ||
| 244 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | ||
| 245 | $query_params, $form_params, | ||
| 246 | $header_params, $_body_data, $auth_settings); | ||
| 247 | if (!$response) { | ||
| 248 | return; | ||
| 249 | } | ||
| 250 | my $_response_object = $self->{api_client}->deserialize('PathResponse', $response); | ||
| 251 | return $_response_object; | ||
| 252 | } | ||
| 253 | |||
| 254 | # | ||
| 255 | # create_dm_routing_config_rule | ||
| 256 | # | ||
| 257 | # Create a rule | ||
| 258 | # | ||
| 259 | # @param string $config_id (required) | ||
| 260 | # @param string $path_id (required) | ||
| 261 | # @param RuleCreate $rule_create (optional) | ||
| 262 | { | ||
| 263 | my $params = { | ||
| 264 | 'config_id' => { | ||
| 265 | data_type => 'string', | ||
| 266 | description => '', | ||
| 267 | required => '1', | ||
| 268 | }, | ||
| 269 | 'path_id' => { | ||
| 270 | data_type => 'string', | ||
| 271 | description => '', | ||
| 272 | required => '1', | ||
| 273 | }, | ||
| 274 | 'rule_create' => { | ||
| 275 | data_type => 'RuleCreate', | ||
| 276 | description => '', | ||
| 277 | required => '0', | ||
| 278 | }, | ||
| 279 | }; | ||
| 280 | __PACKAGE__->method_documentation->{ 'create_dm_routing_config_rule' } = { | ||
| 281 | summary => 'Create a rule', | ||
| 282 | params => $params, | ||
| 283 | returns => 'RuleResponse', | ||
| 284 | }; | ||
| 285 | } | ||
| 286 | # @return RuleResponse | ||
| 287 | # | ||
| 288 | sub create_dm_routing_config_rule { | ||
| 289 | my ($self, %args) = @_; | ||
| 290 | |||
| 291 | # verify the required parameter 'config_id' is set | ||
| 292 | unless (exists $args{'config_id'}) { | ||
| 293 | croak("Missing the required parameter 'config_id' when calling create_dm_routing_config_rule"); | ||
| 294 | } | ||
| 295 | |||
| 296 | # verify the required parameter 'path_id' is set | ||
| 297 | unless (exists $args{'path_id'}) { | ||
| 298 | croak("Missing the required parameter 'path_id' when calling create_dm_routing_config_rule"); | ||
| 299 | } | ||
| 300 | |||
| 301 | # parse inputs | ||
| 302 | my $_resource_path = '/domain-management/v1/routing-configs/{config_id}/paths/{path_id}/rules'; | ||
| 303 | |||
| 304 | my $_method = 'POST'; | ||
| 305 | my $query_params = {}; | ||
| 306 | my $header_params = {}; | ||
| 307 | my $form_params = {}; | ||
| 308 | |||
| 309 | # 'Accept' and 'Content-Type' header | ||
| 310 | my $_header_accept = $self->{api_client}->select_header_accept('application/json'); | ||
| 311 | if ($_header_accept) { | ||
| 312 | $header_params->{'Accept'} = $_header_accept; | ||
| 313 | } | ||
| 314 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); | ||
| 315 | |||
| 316 | # path params | ||
| 317 | if ( exists $args{'config_id'}) { | ||
| 318 | my $_base_variable = "{" . "config_id" . "}"; | ||
| 319 | my $_base_value = $self->{api_client}->to_path_value($args{'config_id'}); | ||
| 320 | $_resource_path =~ s/$_base_variable/$_base_value/g; | ||
| 321 | } | ||
| 322 | |||
| 323 | # path params | ||
| 324 | if ( exists $args{'path_id'}) { | ||
| 325 | my $_base_variable = "{" . "path_id" . "}"; | ||
| 326 | my $_base_value = $self->{api_client}->to_path_value($args{'path_id'}); | ||
| 327 | $_resource_path =~ s/$_base_variable/$_base_value/g; | ||
| 328 | } | ||
| 329 | |||
| 330 | my $_body_data; | ||
| 331 | # body params | ||
| 332 | if ( exists $args{'rule_create'}) { | ||
| 333 | $_body_data = $args{'rule_create'}; | ||
| 334 | } | ||
| 335 | |||
| 336 | # authentication setting, if any | ||
| 337 | my $auth_settings = [qw(token )]; | ||
| 338 | |||
| 339 | # make the API Call | ||
| 340 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | ||
| 341 | $query_params, $form_params, | ||
| 342 | $header_params, $_body_data, $auth_settings); | ||
| 343 | if (!$response) { | ||
| 344 | return; | ||
| 345 | } | ||
| 346 | my $_response_object = $self->{api_client}->deserialize('RuleResponse', $response); | ||
| 347 | return $_response_object; | ||
| 348 | } | ||
| 349 | |||
| 350 | # | ||
| 351 | # deactivate_dm_routing_config | ||
| 352 | # | ||
| 353 | # Deactivate a routing config | ||
| 354 | # | ||
| 355 | # @param string $config_id (required) | ||
| 356 | { | ||
| 357 | my $params = { | ||
| 358 | 'config_id' => { | ||
| 359 | data_type => 'string', | ||
| 360 | description => '', | ||
| 361 | required => '1', | ||
| 362 | }, | ||
| 363 | }; | ||
| 364 | __PACKAGE__->method_documentation->{ 'deactivate_dm_routing_config' } = { | ||
| 365 | summary => 'Deactivate a routing config', | ||
| 366 | params => $params, | ||
| 367 | returns => 'RoutingConfigResponse', | ||
| 368 | }; | ||
| 369 | } | ||
| 370 | # @return RoutingConfigResponse | ||
| 371 | # | ||
| 372 | sub deactivate_dm_routing_config { | ||
| 373 | my ($self, %args) = @_; | ||
| 374 | |||
| 375 | # verify the required parameter 'config_id' is set | ||
| 376 | unless (exists $args{'config_id'}) { | ||
| 377 | croak("Missing the required parameter 'config_id' when calling deactivate_dm_routing_config"); | ||
| 378 | } | ||
| 379 | |||
| 380 | # parse inputs | ||
| 381 | my $_resource_path = '/domain-management/v1/routing-configs/{config_id}/deactivate'; | ||
| 382 | |||
| 383 | my $_method = 'POST'; | ||
| 384 | my $query_params = {}; | ||
| 385 | my $header_params = {}; | ||
| 386 | my $form_params = {}; | ||
| 387 | |||
| 388 | # 'Accept' and 'Content-Type' header | ||
| 389 | my $_header_accept = $self->{api_client}->select_header_accept('application/json'); | ||
| 390 | if ($_header_accept) { | ||
| 391 | $header_params->{'Accept'} = $_header_accept; | ||
| 392 | } | ||
| 393 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); | ||
| 394 | |||
| 395 | # path params | ||
| 396 | if ( exists $args{'config_id'}) { | ||
| 397 | my $_base_variable = "{" . "config_id" . "}"; | ||
| 398 | my $_base_value = $self->{api_client}->to_path_value($args{'config_id'}); | ||
| 399 | $_resource_path =~ s/$_base_variable/$_base_value/g; | ||
| 400 | } | ||
| 401 | |||
| 402 | my $_body_data; | ||
| 403 | # authentication setting, if any | ||
| 404 | my $auth_settings = [qw(token )]; | ||
| 405 | |||
| 406 | # make the API Call | ||
| 407 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | ||
| 408 | $query_params, $form_params, | ||
| 409 | $header_params, $_body_data, $auth_settings); | ||
| 410 | if (!$response) { | ||
| 411 | return; | ||
| 412 | } | ||
| 413 | my $_response_object = $self->{api_client}->deserialize('RoutingConfigResponse', $response); | ||
| 414 | return $_response_object; | ||
| 415 | } | ||
| 416 | |||
| 417 | # | ||
| 418 | # delete_dm_routing_config | ||
| 419 | # | ||
| 420 | # Delete a routing config | ||
| 421 | # | ||
| 422 | # @param string $config_id (required) | ||
| 423 | # @param boolean $force When `true`, allows deleting a routing config that has an active version. This is destructive — traffic routing for any paths served by the config will stop immediately. (optional, default to false) | ||
| 424 | { | ||
| 425 | my $params = { | ||
| 426 | 'config_id' => { | ||
| 427 | data_type => 'string', | ||
| 428 | description => '', | ||
| 429 | required => '1', | ||
| 430 | }, | ||
| 431 | 'force' => { | ||
| 432 | data_type => 'boolean', | ||
| 433 | description => 'When `true`, allows deleting a routing config that has an active version. This is destructive — traffic routing for any paths served by the config will stop immediately.', | ||
| 434 | required => '0', | ||
| 435 | }, | ||
| 436 | }; | ||
| 437 | __PACKAGE__->method_documentation->{ 'delete_dm_routing_config' } = { | ||
| 438 | summary => 'Delete a routing config', | ||
| 439 | params => $params, | ||
| 440 | returns => undef, | ||
| 441 | }; | ||
| 442 | } | ||
| 443 | # @return void | ||
| 444 | # | ||
| 445 | sub delete_dm_routing_config { | ||
| 446 | my ($self, %args) = @_; | ||
| 447 | |||
| 448 | # verify the required parameter 'config_id' is set | ||
| 449 | unless (exists $args{'config_id'}) { | ||
| 450 | croak("Missing the required parameter 'config_id' when calling delete_dm_routing_config"); | ||
| 451 | } | ||
| 452 | |||
| 453 | # parse inputs | ||
| 454 | my $_resource_path = '/domain-management/v1/routing-configs/{config_id}'; | ||
| 455 | |||
| 456 | my $_method = 'DELETE'; | ||
| 457 | my $query_params = {}; | ||
| 458 | my $header_params = {}; | ||
| 459 | my $form_params = {}; | ||
| 460 | |||
| 461 | # 'Accept' and 'Content-Type' header | ||
| 462 | my $_header_accept = $self->{api_client}->select_header_accept(); | ||
| 463 | if ($_header_accept) { | ||
| 464 | $header_params->{'Accept'} = $_header_accept; | ||
| 465 | } | ||
| 466 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); | ||
| 467 | |||
| 468 | # query params | ||
| 469 | if ( exists $args{'force'}) { | ||
| 470 | $query_params->{'force'} = $self->{api_client}->to_query_value($args{'force'}); | ||
| 471 | } | ||
| 472 | |||
| 473 | # path params | ||
| 474 | if ( exists $args{'config_id'}) { | ||
| 475 | my $_base_variable = "{" . "config_id" . "}"; | ||
| 476 | my $_base_value = $self->{api_client}->to_path_value($args{'config_id'}); | ||
| 477 | $_resource_path =~ s/$_base_variable/$_base_value/g; | ||
| 478 | } | ||
| 479 | |||
| 480 | my $_body_data; | ||
| 481 | # authentication setting, if any | ||
| 482 | my $auth_settings = [qw(token )]; | ||
| 483 | |||
| 484 | # make the API Call | ||
| 485 | $self->{api_client}->call_api($_resource_path, $_method, | ||
| 486 | $query_params, $form_params, | ||
| 487 | $header_params, $_body_data, $auth_settings); | ||
| 488 | return; | ||
| 489 | } | ||
| 490 | |||
| 491 | # | ||
| 492 | # delete_dm_routing_config_inactive_versions | ||
| 493 | # | ||
| 494 | # Delete inactive versions | ||
| 495 | # | ||
| 496 | # @param string $config_id (required) | ||
| 497 | { | ||
| 498 | my $params = { | ||
| 499 | 'config_id' => { | ||
| 500 | data_type => 'string', | ||
| 501 | description => '', | ||
| 502 | required => '1', | ||
| 503 | }, | ||
| 504 | }; | ||
| 505 | __PACKAGE__->method_documentation->{ 'delete_dm_routing_config_inactive_versions' } = { | ||
| 506 | summary => 'Delete inactive versions', | ||
| 507 | params => $params, | ||
| 508 | returns => undef, | ||
| 509 | }; | ||
| 510 | } | ||
| 511 | # @return void | ||
| 512 | # | ||
| 513 | sub delete_dm_routing_config_inactive_versions { | ||
| 514 | my ($self, %args) = @_; | ||
| 515 | |||
| 516 | # verify the required parameter 'config_id' is set | ||
| 517 | unless (exists $args{'config_id'}) { | ||
| 518 | croak("Missing the required parameter 'config_id' when calling delete_dm_routing_config_inactive_versions"); | ||
| 519 | } | ||
| 520 | |||
| 521 | # parse inputs | ||
| 522 | my $_resource_path = '/domain-management/v1/routing-configs/{config_id}/versions/inactive'; | ||
| 523 | |||
| 524 | my $_method = 'DELETE'; | ||
| 525 | my $query_params = {}; | ||
| 526 | my $header_params = {}; | ||
| 527 | my $form_params = {}; | ||
| 528 | |||
| 529 | # 'Accept' and 'Content-Type' header | ||
| 530 | my $_header_accept = $self->{api_client}->select_header_accept(); | ||
| 531 | if ($_header_accept) { | ||
| 532 | $header_params->{'Accept'} = $_header_accept; | ||
| 533 | } | ||
| 534 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); | ||
| 535 | |||
| 536 | # path params | ||
| 537 | if ( exists $args{'config_id'}) { | ||
| 538 | my $_base_variable = "{" . "config_id" . "}"; | ||
| 539 | my $_base_value = $self->{api_client}->to_path_value($args{'config_id'}); | ||
| 540 | $_resource_path =~ s/$_base_variable/$_base_value/g; | ||
| 541 | } | ||
| 542 | |||
| 543 | my $_body_data; | ||
| 544 | # authentication setting, if any | ||
| 545 | my $auth_settings = [qw(token )]; | ||
| 546 | |||
| 547 | # make the API Call | ||
| 548 | $self->{api_client}->call_api($_resource_path, $_method, | ||
| 549 | $query_params, $form_params, | ||
| 550 | $header_params, $_body_data, $auth_settings); | ||
| 551 | return; | ||
| 552 | } | ||
| 553 | |||
| 554 | # | ||
| 555 | # delete_dm_routing_config_path | ||
| 556 | # | ||
| 557 | # Delete a path | ||
| 558 | # | ||
| 559 | # @param string $config_id (required) | ||
| 560 | # @param string $path_id (required) | ||
| 561 | { | ||
| 562 | my $params = { | ||
| 563 | 'config_id' => { | ||
| 564 | data_type => 'string', | ||
| 565 | description => '', | ||
| 566 | required => '1', | ||
| 567 | }, | ||
| 568 | 'path_id' => { | ||
| 569 | data_type => 'string', | ||
| 570 | description => '', | ||
| 571 | required => '1', | ||
| 572 | }, | ||
| 573 | }; | ||
| 574 | __PACKAGE__->method_documentation->{ 'delete_dm_routing_config_path' } = { | ||
| 575 | summary => 'Delete a path', | ||
| 576 | params => $params, | ||
| 577 | returns => undef, | ||
| 578 | }; | ||
| 579 | } | ||
| 580 | # @return void | ||
| 581 | # | ||
| 582 | sub delete_dm_routing_config_path { | ||
| 583 | my ($self, %args) = @_; | ||
| 584 | |||
| 585 | # verify the required parameter 'config_id' is set | ||
| 586 | unless (exists $args{'config_id'}) { | ||
| 587 | croak("Missing the required parameter 'config_id' when calling delete_dm_routing_config_path"); | ||
| 588 | } | ||
| 589 | |||
| 590 | # verify the required parameter 'path_id' is set | ||
| 591 | unless (exists $args{'path_id'}) { | ||
| 592 | croak("Missing the required parameter 'path_id' when calling delete_dm_routing_config_path"); | ||
| 593 | } | ||
| 594 | |||
| 595 | # parse inputs | ||
| 596 | my $_resource_path = '/domain-management/v1/routing-configs/{config_id}/paths/{path_id}'; | ||
| 597 | |||
| 598 | my $_method = 'DELETE'; | ||
| 599 | my $query_params = {}; | ||
| 600 | my $header_params = {}; | ||
| 601 | my $form_params = {}; | ||
| 602 | |||
| 603 | # 'Accept' and 'Content-Type' header | ||
| 604 | my $_header_accept = $self->{api_client}->select_header_accept(); | ||
| 605 | if ($_header_accept) { | ||
| 606 | $header_params->{'Accept'} = $_header_accept; | ||
| 607 | } | ||
| 608 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); | ||
| 609 | |||
| 610 | # path params | ||
| 611 | if ( exists $args{'config_id'}) { | ||
| 612 | my $_base_variable = "{" . "config_id" . "}"; | ||
| 613 | my $_base_value = $self->{api_client}->to_path_value($args{'config_id'}); | ||
| 614 | $_resource_path =~ s/$_base_variable/$_base_value/g; | ||
| 615 | } | ||
| 616 | |||
| 617 | # path params | ||
| 618 | if ( exists $args{'path_id'}) { | ||
| 619 | my $_base_variable = "{" . "path_id" . "}"; | ||
| 620 | my $_base_value = $self->{api_client}->to_path_value($args{'path_id'}); | ||
| 621 | $_resource_path =~ s/$_base_variable/$_base_value/g; | ||
| 622 | } | ||
| 623 | |||
| 624 | my $_body_data; | ||
| 625 | # authentication setting, if any | ||
| 626 | my $auth_settings = [qw(token )]; | ||
| 627 | |||
| 628 | # make the API Call | ||
| 629 | $self->{api_client}->call_api($_resource_path, $_method, | ||
| 630 | $query_params, $form_params, | ||
| 631 | $header_params, $_body_data, $auth_settings); | ||
| 632 | return; | ||
| 633 | } | ||
| 634 | |||
| 635 | # | ||
| 636 | # delete_dm_routing_config_rule | ||
| 637 | # | ||
| 638 | # Delete a rule | ||
| 639 | # | ||
| 640 | # @param string $config_id (required) | ||
| 641 | # @param string $path_id (required) | ||
| 642 | # @param string $rule_id (required) | ||
| 643 | { | ||
| 644 | my $params = { | ||
| 645 | 'config_id' => { | ||
| 646 | data_type => 'string', | ||
| 647 | description => '', | ||
| 648 | required => '1', | ||
| 649 | }, | ||
| 650 | 'path_id' => { | ||
| 651 | data_type => 'string', | ||
| 652 | description => '', | ||
| 653 | required => '1', | ||
| 654 | }, | ||
| 655 | 'rule_id' => { | ||
| 656 | data_type => 'string', | ||
| 657 | description => '', | ||
| 658 | required => '1', | ||
| 659 | }, | ||
| 660 | }; | ||
| 661 | __PACKAGE__->method_documentation->{ 'delete_dm_routing_config_rule' } = { | ||
| 662 | summary => 'Delete a rule', | ||
| 663 | params => $params, | ||
| 664 | returns => undef, | ||
| 665 | }; | ||
| 666 | } | ||
| 667 | # @return void | ||
| 668 | # | ||
| 669 | sub delete_dm_routing_config_rule { | ||
| 670 | my ($self, %args) = @_; | ||
| 671 | |||
| 672 | # verify the required parameter 'config_id' is set | ||
| 673 | unless (exists $args{'config_id'}) { | ||
| 674 | croak("Missing the required parameter 'config_id' when calling delete_dm_routing_config_rule"); | ||
| 675 | } | ||
| 676 | |||
| 677 | # verify the required parameter 'path_id' is set | ||
| 678 | unless (exists $args{'path_id'}) { | ||
| 679 | croak("Missing the required parameter 'path_id' when calling delete_dm_routing_config_rule"); | ||
| 680 | } | ||
| 681 | |||
| 682 | # verify the required parameter 'rule_id' is set | ||
| 683 | unless (exists $args{'rule_id'}) { | ||
| 684 | croak("Missing the required parameter 'rule_id' when calling delete_dm_routing_config_rule"); | ||
| 685 | } | ||
| 686 | |||
| 687 | # parse inputs | ||
| 688 | my $_resource_path = '/domain-management/v1/routing-configs/{config_id}/paths/{path_id}/rules/{rule_id}'; | ||
| 689 | |||
| 690 | my $_method = 'DELETE'; | ||
| 691 | my $query_params = {}; | ||
| 692 | my $header_params = {}; | ||
| 693 | my $form_params = {}; | ||
| 694 | |||
| 695 | # 'Accept' and 'Content-Type' header | ||
| 696 | my $_header_accept = $self->{api_client}->select_header_accept(); | ||
| 697 | if ($_header_accept) { | ||
| 698 | $header_params->{'Accept'} = $_header_accept; | ||
| 699 | } | ||
| 700 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); | ||
| 701 | |||
| 702 | # path params | ||
| 703 | if ( exists $args{'config_id'}) { | ||
| 704 | my $_base_variable = "{" . "config_id" . "}"; | ||
| 705 | my $_base_value = $self->{api_client}->to_path_value($args{'config_id'}); | ||
| 706 | $_resource_path =~ s/$_base_variable/$_base_value/g; | ||
| 707 | } | ||
| 708 | |||
| 709 | # path params | ||
| 710 | if ( exists $args{'path_id'}) { | ||
| 711 | my $_base_variable = "{" . "path_id" . "}"; | ||
| 712 | my $_base_value = $self->{api_client}->to_path_value($args{'path_id'}); | ||
| 713 | $_resource_path =~ s/$_base_variable/$_base_value/g; | ||
| 714 | } | ||
| 715 | |||
| 716 | # path params | ||
| 717 | if ( exists $args{'rule_id'}) { | ||
| 718 | my $_base_variable = "{" . "rule_id" . "}"; | ||
| 719 | my $_base_value = $self->{api_client}->to_path_value($args{'rule_id'}); | ||
| 720 | $_resource_path =~ s/$_base_variable/$_base_value/g; | ||
| 721 | } | ||
| 722 | |||
| 723 | my $_body_data; | ||
| 724 | # authentication setting, if any | ||
| 725 | my $auth_settings = [qw(token )]; | ||
| 726 | |||
| 727 | # make the API Call | ||
| 728 | $self->{api_client}->call_api($_resource_path, $_method, | ||
| 729 | $query_params, $form_params, | ||
| 730 | $header_params, $_body_data, $auth_settings); | ||
| 731 | return; | ||
| 732 | } | ||
| 733 | |||
| 734 | # | ||
| 735 | # discard_dm_routing_config_draft | ||
| 736 | # | ||
| 737 | # Discard the draft | ||
| 738 | # | ||
| 739 | # @param string $config_id (required) | ||
| 740 | { | ||
| 741 | my $params = { | ||
| 742 | 'config_id' => { | ||
| 743 | data_type => 'string', | ||
| 744 | description => '', | ||
| 745 | required => '1', | ||
| 746 | }, | ||
| 747 | }; | ||
| 748 | __PACKAGE__->method_documentation->{ 'discard_dm_routing_config_draft' } = { | ||
| 749 | summary => 'Discard the draft', | ||
| 750 | params => $params, | ||
| 751 | returns => undef, | ||
| 752 | }; | ||
| 753 | } | ||
| 754 | # @return void | ||
| 755 | # | ||
| 756 | sub discard_dm_routing_config_draft { | ||
| 757 | my ($self, %args) = @_; | ||
| 758 | |||
| 759 | # verify the required parameter 'config_id' is set | ||
| 760 | unless (exists $args{'config_id'}) { | ||
| 761 | croak("Missing the required parameter 'config_id' when calling discard_dm_routing_config_draft"); | ||
| 762 | } | ||
| 763 | |||
| 764 | # parse inputs | ||
| 765 | my $_resource_path = '/domain-management/v1/routing-configs/{config_id}/draft'; | ||
| 766 | |||
| 767 | my $_method = 'DELETE'; | ||
| 768 | my $query_params = {}; | ||
| 769 | my $header_params = {}; | ||
| 770 | my $form_params = {}; | ||
| 771 | |||
| 772 | # 'Accept' and 'Content-Type' header | ||
| 773 | my $_header_accept = $self->{api_client}->select_header_accept(); | ||
| 774 | if ($_header_accept) { | ||
| 775 | $header_params->{'Accept'} = $_header_accept; | ||
| 776 | } | ||
| 777 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); | ||
| 778 | |||
| 779 | # path params | ||
| 780 | if ( exists $args{'config_id'}) { | ||
| 781 | my $_base_variable = "{" . "config_id" . "}"; | ||
| 782 | my $_base_value = $self->{api_client}->to_path_value($args{'config_id'}); | ||
| 783 | $_resource_path =~ s/$_base_variable/$_base_value/g; | ||
| 784 | } | ||
| 785 | |||
| 786 | my $_body_data; | ||
| 787 | # authentication setting, if any | ||
| 788 | my $auth_settings = [qw(token )]; | ||
| 789 | |||
| 790 | # make the API Call | ||
| 791 | $self->{api_client}->call_api($_resource_path, $_method, | ||
| 792 | $query_params, $form_params, | ||
| 793 | $header_params, $_body_data, $auth_settings); | ||
| 794 | return; | ||
| 795 | } | ||
| 796 | |||
| 797 | # | ||
| 798 | # get_dm_routing_config | ||
| 799 | # | ||
| 800 | # Get a routing config | ||
| 801 | # | ||
| 802 | # @param string $config_id (required) | ||
| 803 | { | ||
| 804 | my $params = { | ||
| 805 | 'config_id' => { | ||
| 806 | data_type => 'string', | ||
| 807 | description => '', | ||
| 808 | required => '1', | ||
| 809 | }, | ||
| 810 | }; | ||
| 811 | __PACKAGE__->method_documentation->{ 'get_dm_routing_config' } = { | ||
| 812 | summary => 'Get a routing config', | ||
| 813 | params => $params, | ||
| 814 | returns => 'RoutingConfigResponse', | ||
| 815 | }; | ||
| 816 | } | ||
| 817 | # @return RoutingConfigResponse | ||
| 818 | # | ||
| 819 | sub get_dm_routing_config { | ||
| 820 | my ($self, %args) = @_; | ||
| 821 | |||
| 822 | # verify the required parameter 'config_id' is set | ||
| 823 | unless (exists $args{'config_id'}) { | ||
| 824 | croak("Missing the required parameter 'config_id' when calling get_dm_routing_config"); | ||
| 825 | } | ||
| 826 | |||
| 827 | # parse inputs | ||
| 828 | my $_resource_path = '/domain-management/v1/routing-configs/{config_id}'; | ||
| 829 | |||
| 830 | my $_method = 'GET'; | ||
| 831 | my $query_params = {}; | ||
| 832 | my $header_params = {}; | ||
| 833 | my $form_params = {}; | ||
| 834 | |||
| 835 | # 'Accept' and 'Content-Type' header | ||
| 836 | my $_header_accept = $self->{api_client}->select_header_accept('application/json'); | ||
| 837 | if ($_header_accept) { | ||
| 838 | $header_params->{'Accept'} = $_header_accept; | ||
| 839 | } | ||
| 840 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); | ||
| 841 | |||
| 842 | # path params | ||
| 843 | if ( exists $args{'config_id'}) { | ||
| 844 | my $_base_variable = "{" . "config_id" . "}"; | ||
| 845 | my $_base_value = $self->{api_client}->to_path_value($args{'config_id'}); | ||
| 846 | $_resource_path =~ s/$_base_variable/$_base_value/g; | ||
| 847 | } | ||
| 848 | |||
| 849 | my $_body_data; | ||
| 850 | # authentication setting, if any | ||
| 851 | my $auth_settings = [qw(token )]; | ||
| 852 | |||
| 853 | # make the API Call | ||
| 854 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | ||
| 855 | $query_params, $form_params, | ||
| 856 | $header_params, $_body_data, $auth_settings); | ||
| 857 | if (!$response) { | ||
| 858 | return; | ||
| 859 | } | ||
| 860 | my $_response_object = $self->{api_client}->deserialize('RoutingConfigResponse', $response); | ||
| 861 | return $_response_object; | ||
| 862 | } | ||
| 863 | |||
| 864 | # | ||
| 865 | # get_dm_routing_config_draft_diff | ||
| 866 | # | ||
| 867 | # Get the draft diff | ||
| 868 | # | ||
| 869 | # @param string $config_id (required) | ||
| 870 | { | ||
| 871 | my $params = { | ||
| 872 | 'config_id' => { | ||
| 873 | data_type => 'string', | ||
| 874 | description => '', | ||
| 875 | required => '1', | ||
| 876 | }, | ||
| 877 | }; | ||
| 878 | __PACKAGE__->method_documentation->{ 'get_dm_routing_config_draft_diff' } = { | ||
| 879 | summary => 'Get the draft diff', | ||
| 880 | params => $params, | ||
| 881 | returns => 'DraftDiff', | ||
| 882 | }; | ||
| 883 | } | ||
| 884 | # @return DraftDiff | ||
| 885 | # | ||
| 886 | sub get_dm_routing_config_draft_diff { | ||
| 887 | my ($self, %args) = @_; | ||
| 888 | |||
| 889 | # verify the required parameter 'config_id' is set | ||
| 890 | unless (exists $args{'config_id'}) { | ||
| 891 | croak("Missing the required parameter 'config_id' when calling get_dm_routing_config_draft_diff"); | ||
| 892 | } | ||
| 893 | |||
| 894 | # parse inputs | ||
| 895 | my $_resource_path = '/domain-management/v1/routing-configs/{config_id}/draft/diff'; | ||
| 896 | |||
| 897 | my $_method = 'GET'; | ||
| 898 | my $query_params = {}; | ||
| 899 | my $header_params = {}; | ||
| 900 | my $form_params = {}; | ||
| 901 | |||
| 902 | # 'Accept' and 'Content-Type' header | ||
| 903 | my $_header_accept = $self->{api_client}->select_header_accept('application/json'); | ||
| 904 | if ($_header_accept) { | ||
| 905 | $header_params->{'Accept'} = $_header_accept; | ||
| 906 | } | ||
| 907 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); | ||
| 908 | |||
| 909 | # path params | ||
| 910 | if ( exists $args{'config_id'}) { | ||
| 911 | my $_base_variable = "{" . "config_id" . "}"; | ||
| 912 | my $_base_value = $self->{api_client}->to_path_value($args{'config_id'}); | ||
| 913 | $_resource_path =~ s/$_base_variable/$_base_value/g; | ||
| 914 | } | ||
| 915 | |||
| 916 | my $_body_data; | ||
| 917 | # authentication setting, if any | ||
| 918 | my $auth_settings = [qw(token )]; | ||
| 919 | |||
| 920 | # make the API Call | ||
| 921 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | ||
| 922 | $query_params, $form_params, | ||
| 923 | $header_params, $_body_data, $auth_settings); | ||
| 924 | if (!$response) { | ||
| 925 | return; | ||
| 926 | } | ||
| 927 | my $_response_object = $self->{api_client}->deserialize('DraftDiff', $response); | ||
| 928 | return $_response_object; | ||
| 929 | } | ||
| 930 | |||
| 931 | # | ||
| 932 | # get_dm_routing_config_path | ||
| 933 | # | ||
| 934 | # Get a path | ||
| 935 | # | ||
| 936 | # @param string $config_id (required) | ||
| 937 | # @param string $path_id (required) | ||
| 938 | { | ||
| 939 | my $params = { | ||
| 940 | 'config_id' => { | ||
| 941 | data_type => 'string', | ||
| 942 | description => '', | ||
| 943 | required => '1', | ||
| 944 | }, | ||
| 945 | 'path_id' => { | ||
| 946 | data_type => 'string', | ||
| 947 | description => '', | ||
| 948 | required => '1', | ||
| 949 | }, | ||
| 950 | }; | ||
| 951 | __PACKAGE__->method_documentation->{ 'get_dm_routing_config_path' } = { | ||
| 952 | summary => 'Get a path', | ||
| 953 | params => $params, | ||
| 954 | returns => 'PathResponse', | ||
| 955 | }; | ||
| 956 | } | ||
| 957 | # @return PathResponse | ||
| 958 | # | ||
| 959 | sub get_dm_routing_config_path { | ||
| 960 | my ($self, %args) = @_; | ||
| 961 | |||
| 962 | # verify the required parameter 'config_id' is set | ||
| 963 | unless (exists $args{'config_id'}) { | ||
| 964 | croak("Missing the required parameter 'config_id' when calling get_dm_routing_config_path"); | ||
| 965 | } | ||
| 966 | |||
| 967 | # verify the required parameter 'path_id' is set | ||
| 968 | unless (exists $args{'path_id'}) { | ||
| 969 | croak("Missing the required parameter 'path_id' when calling get_dm_routing_config_path"); | ||
| 970 | } | ||
| 971 | |||
| 972 | # parse inputs | ||
| 973 | my $_resource_path = '/domain-management/v1/routing-configs/{config_id}/paths/{path_id}'; | ||
| 974 | |||
| 975 | my $_method = 'GET'; | ||
| 976 | my $query_params = {}; | ||
| 977 | my $header_params = {}; | ||
| 978 | my $form_params = {}; | ||
| 979 | |||
| 980 | # 'Accept' and 'Content-Type' header | ||
| 981 | my $_header_accept = $self->{api_client}->select_header_accept('application/json'); | ||
| 982 | if ($_header_accept) { | ||
| 983 | $header_params->{'Accept'} = $_header_accept; | ||
| 984 | } | ||
| 985 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); | ||
| 986 | |||
| 987 | # path params | ||
| 988 | if ( exists $args{'config_id'}) { | ||
| 989 | my $_base_variable = "{" . "config_id" . "}"; | ||
| 990 | my $_base_value = $self->{api_client}->to_path_value($args{'config_id'}); | ||
| 991 | $_resource_path =~ s/$_base_variable/$_base_value/g; | ||
| 992 | } | ||
| 993 | |||
| 994 | # path params | ||
| 995 | if ( exists $args{'path_id'}) { | ||
| 996 | my $_base_variable = "{" . "path_id" . "}"; | ||
| 997 | my $_base_value = $self->{api_client}->to_path_value($args{'path_id'}); | ||
| 998 | $_resource_path =~ s/$_base_variable/$_base_value/g; | ||
| 999 | } | ||
| 1000 | |||
| 1001 | my $_body_data; | ||
| 1002 | # authentication setting, if any | ||
| 1003 | my $auth_settings = [qw(token )]; | ||
| 1004 | |||
| 1005 | # make the API Call | ||
| 1006 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | ||
| 1007 | $query_params, $form_params, | ||
| 1008 | $header_params, $_body_data, $auth_settings); | ||
| 1009 | if (!$response) { | ||
| 1010 | return; | ||
| 1011 | } | ||
| 1012 | my $_response_object = $self->{api_client}->deserialize('PathResponse', $response); | ||
| 1013 | return $_response_object; | ||
| 1014 | } | ||
| 1015 | |||
| 1016 | # | ||
| 1017 | # get_dm_routing_config_rule | ||
| 1018 | # | ||
| 1019 | # Get a rule | ||
| 1020 | # | ||
| 1021 | # @param string $config_id (required) | ||
| 1022 | # @param string $path_id (required) | ||
| 1023 | # @param string $rule_id (required) | ||
| 1024 | { | ||
| 1025 | my $params = { | ||
| 1026 | 'config_id' => { | ||
| 1027 | data_type => 'string', | ||
| 1028 | description => '', | ||
| 1029 | required => '1', | ||
| 1030 | }, | ||
| 1031 | 'path_id' => { | ||
| 1032 | data_type => 'string', | ||
| 1033 | description => '', | ||
| 1034 | required => '1', | ||
| 1035 | }, | ||
| 1036 | 'rule_id' => { | ||
| 1037 | data_type => 'string', | ||
| 1038 | description => '', | ||
| 1039 | required => '1', | ||
| 1040 | }, | ||
| 1041 | }; | ||
| 1042 | __PACKAGE__->method_documentation->{ 'get_dm_routing_config_rule' } = { | ||
| 1043 | summary => 'Get a rule', | ||
| 1044 | params => $params, | ||
| 1045 | returns => 'RuleResponse', | ||
| 1046 | }; | ||
| 1047 | } | ||
| 1048 | # @return RuleResponse | ||
| 1049 | # | ||
| 1050 | sub get_dm_routing_config_rule { | ||
| 1051 | my ($self, %args) = @_; | ||
| 1052 | |||
| 1053 | # verify the required parameter 'config_id' is set | ||
| 1054 | unless (exists $args{'config_id'}) { | ||
| 1055 | croak("Missing the required parameter 'config_id' when calling get_dm_routing_config_rule"); | ||
| 1056 | } | ||
| 1057 | |||
| 1058 | # verify the required parameter 'path_id' is set | ||
| 1059 | unless (exists $args{'path_id'}) { | ||
| 1060 | croak("Missing the required parameter 'path_id' when calling get_dm_routing_config_rule"); | ||
| 1061 | } | ||
| 1062 | |||
| 1063 | # verify the required parameter 'rule_id' is set | ||
| 1064 | unless (exists $args{'rule_id'}) { | ||
| 1065 | croak("Missing the required parameter 'rule_id' when calling get_dm_routing_config_rule"); | ||
| 1066 | } | ||
| 1067 | |||
| 1068 | # parse inputs | ||
| 1069 | my $_resource_path = '/domain-management/v1/routing-configs/{config_id}/paths/{path_id}/rules/{rule_id}'; | ||
| 1070 | |||
| 1071 | my $_method = 'GET'; | ||
| 1072 | my $query_params = {}; | ||
| 1073 | my $header_params = {}; | ||
| 1074 | my $form_params = {}; | ||
| 1075 | |||
| 1076 | # 'Accept' and 'Content-Type' header | ||
| 1077 | my $_header_accept = $self->{api_client}->select_header_accept('application/json'); | ||
| 1078 | if ($_header_accept) { | ||
| 1079 | $header_params->{'Accept'} = $_header_accept; | ||
| 1080 | } | ||
| 1081 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); | ||
| 1082 | |||
| 1083 | # path params | ||
| 1084 | if ( exists $args{'config_id'}) { | ||
| 1085 | my $_base_variable = "{" . "config_id" . "}"; | ||
| 1086 | my $_base_value = $self->{api_client}->to_path_value($args{'config_id'}); | ||
| 1087 | $_resource_path =~ s/$_base_variable/$_base_value/g; | ||
| 1088 | } | ||
| 1089 | |||
| 1090 | # path params | ||
| 1091 | if ( exists $args{'path_id'}) { | ||
| 1092 | my $_base_variable = "{" . "path_id" . "}"; | ||
| 1093 | my $_base_value = $self->{api_client}->to_path_value($args{'path_id'}); | ||
| 1094 | $_resource_path =~ s/$_base_variable/$_base_value/g; | ||
| 1095 | } | ||
| 1096 | |||
| 1097 | # path params | ||
| 1098 | if ( exists $args{'rule_id'}) { | ||
| 1099 | my $_base_variable = "{" . "rule_id" . "}"; | ||
| 1100 | my $_base_value = $self->{api_client}->to_path_value($args{'rule_id'}); | ||
| 1101 | $_resource_path =~ s/$_base_variable/$_base_value/g; | ||
| 1102 | } | ||
| 1103 | |||
| 1104 | my $_body_data; | ||
| 1105 | # authentication setting, if any | ||
| 1106 | my $auth_settings = [qw(token )]; | ||
| 1107 | |||
| 1108 | # make the API Call | ||
| 1109 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | ||
| 1110 | $query_params, $form_params, | ||
| 1111 | $header_params, $_body_data, $auth_settings); | ||
| 1112 | if (!$response) { | ||
| 1113 | return; | ||
| 1114 | } | ||
| 1115 | my $_response_object = $self->{api_client}->deserialize('RuleResponse', $response); | ||
| 1116 | return $_response_object; | ||
| 1117 | } | ||
| 1118 | |||
| 1119 | # | ||
| 1120 | # list_dm_routing_config_paths | ||
| 1121 | # | ||
| 1122 | # List paths | ||
| 1123 | # | ||
| 1124 | # @param string $config_id (required) | ||
| 1125 | # @param string $path Filter results by path pattern. The match strategy is controlled by the `match` parameter. (optional) | ||
| 1126 | # @param string $match How to match the value of the `path` filter against existing path patterns. Has no effect unless `path` is also provided. (optional, default to 'exact') | ||
| 1127 | # @param string $sort The order in which to list the results. (optional, default to '-created_at') | ||
| 1128 | # @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) | ||
| 1129 | # @param int $limit Limit how many results are returned. (optional, default to 20) | ||
| 1130 | { | ||
| 1131 | my $params = { | ||
| 1132 | 'config_id' => { | ||
| 1133 | data_type => 'string', | ||
| 1134 | description => '', | ||
| 1135 | required => '1', | ||
| 1136 | }, | ||
| 1137 | 'path' => { | ||
| 1138 | data_type => 'string', | ||
| 1139 | description => 'Filter results by path pattern. The match strategy is controlled by the `match` parameter.', | ||
| 1140 | required => '0', | ||
| 1141 | }, | ||
| 1142 | 'match' => { | ||
| 1143 | data_type => 'string', | ||
| 1144 | description => 'How to match the value of the `path` filter against existing path patterns. Has no effect unless `path` is also provided.', | ||
| 1145 | required => '0', | ||
| 1146 | }, | ||
| 1147 | 'sort' => { | ||
| 1148 | data_type => 'string', | ||
| 1149 | description => 'The order in which to list the results.', | ||
| 1150 | required => '0', | ||
| 1151 | }, | ||
| 1152 | 'cursor' => { | ||
| 1153 | data_type => 'string', | ||
| 1154 | description => 'Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty.', | ||
| 1155 | required => '0', | ||
| 1156 | }, | ||
| 1157 | 'limit' => { | ||
| 1158 | data_type => 'int', | ||
| 1159 | description => 'Limit how many results are returned.', | ||
| 1160 | required => '0', | ||
| 1161 | }, | ||
| 1162 | }; | ||
| 1163 | __PACKAGE__->method_documentation->{ 'list_dm_routing_config_paths' } = { | ||
| 1164 | summary => 'List paths', | ||
| 1165 | params => $params, | ||
| 1166 | returns => 'PathsResponse', | ||
| 1167 | }; | ||
| 1168 | } | ||
| 1169 | # @return PathsResponse | ||
| 1170 | # | ||
| 1171 | sub list_dm_routing_config_paths { | ||
| 1172 | my ($self, %args) = @_; | ||
| 1173 | |||
| 1174 | # verify the required parameter 'config_id' is set | ||
| 1175 | unless (exists $args{'config_id'}) { | ||
| 1176 | croak("Missing the required parameter 'config_id' when calling list_dm_routing_config_paths"); | ||
| 1177 | } | ||
| 1178 | |||
| 1179 | # parse inputs | ||
| 1180 | my $_resource_path = '/domain-management/v1/routing-configs/{config_id}/paths'; | ||
| 1181 | |||
| 1182 | my $_method = 'GET'; | ||
| 1183 | my $query_params = {}; | ||
| 1184 | my $header_params = {}; | ||
| 1185 | my $form_params = {}; | ||
| 1186 | |||
| 1187 | # 'Accept' and 'Content-Type' header | ||
| 1188 | my $_header_accept = $self->{api_client}->select_header_accept('application/json'); | ||
| 1189 | if ($_header_accept) { | ||
| 1190 | $header_params->{'Accept'} = $_header_accept; | ||
| 1191 | } | ||
| 1192 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); | ||
| 1193 | |||
| 1194 | # query params | ||
| 1195 | if ( exists $args{'path'}) { | ||
| 1196 | $query_params->{'path'} = $self->{api_client}->to_query_value($args{'path'}); | ||
| 1197 | } | ||
| 1198 | |||
| 1199 | # query params | ||
| 1200 | if ( exists $args{'match'}) { | ||
| 1201 | $query_params->{'match'} = $self->{api_client}->to_query_value($args{'match'}); | ||
| 1202 | } | ||
| 1203 | |||
| 1204 | # query params | ||
| 1205 | if ( exists $args{'sort'}) { | ||
| 1206 | $query_params->{'sort'} = $self->{api_client}->to_query_value($args{'sort'}); | ||
| 1207 | } | ||
| 1208 | |||
| 1209 | # query params | ||
| 1210 | if ( exists $args{'cursor'}) { | ||
| 1211 | $query_params->{'cursor'} = $self->{api_client}->to_query_value($args{'cursor'}); | ||
| 1212 | } | ||
| 1213 | |||
| 1214 | # query params | ||
| 1215 | if ( exists $args{'limit'}) { | ||
| 1216 | $query_params->{'limit'} = $self->{api_client}->to_query_value($args{'limit'}); | ||
| 1217 | } | ||
| 1218 | |||
| 1219 | # path params | ||
| 1220 | if ( exists $args{'config_id'}) { | ||
| 1221 | my $_base_variable = "{" . "config_id" . "}"; | ||
| 1222 | my $_base_value = $self->{api_client}->to_path_value($args{'config_id'}); | ||
| 1223 | $_resource_path =~ s/$_base_variable/$_base_value/g; | ||
| 1224 | } | ||
| 1225 | |||
| 1226 | my $_body_data; | ||
| 1227 | # authentication setting, if any | ||
| 1228 | my $auth_settings = [qw(token )]; | ||
| 1229 | |||
| 1230 | # make the API Call | ||
| 1231 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | ||
| 1232 | $query_params, $form_params, | ||
| 1233 | $header_params, $_body_data, $auth_settings); | ||
| 1234 | if (!$response) { | ||
| 1235 | return; | ||
| 1236 | } | ||
| 1237 | my $_response_object = $self->{api_client}->deserialize('PathsResponse', $response); | ||
| 1238 | return $_response_object; | ||
| 1239 | } | ||
| 1240 | |||
| 1241 | # | ||
| 1242 | # list_dm_routing_config_rules | ||
| 1243 | # | ||
| 1244 | # List rules | ||
| 1245 | # | ||
| 1246 | # @param string $config_id (required) | ||
| 1247 | # @param string $path_id (required) | ||
| 1248 | # @param string $sort The order in which to list the results. (optional, default to 'position') | ||
| 1249 | # @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) | ||
| 1250 | # @param int $limit Limit how many results are returned. (optional, default to 20) | ||
| 1251 | { | ||
| 1252 | my $params = { | ||
| 1253 | 'config_id' => { | ||
| 1254 | data_type => 'string', | ||
| 1255 | description => '', | ||
| 1256 | required => '1', | ||
| 1257 | }, | ||
| 1258 | 'path_id' => { | ||
| 1259 | data_type => 'string', | ||
| 1260 | description => '', | ||
| 1261 | required => '1', | ||
| 1262 | }, | ||
| 1263 | 'sort' => { | ||
| 1264 | data_type => 'string', | ||
| 1265 | description => 'The order in which to list the results.', | ||
| 1266 | required => '0', | ||
| 1267 | }, | ||
| 1268 | 'cursor' => { | ||
| 1269 | data_type => 'string', | ||
| 1270 | description => 'Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty.', | ||
| 1271 | required => '0', | ||
| 1272 | }, | ||
| 1273 | 'limit' => { | ||
| 1274 | data_type => 'int', | ||
| 1275 | description => 'Limit how many results are returned.', | ||
| 1276 | required => '0', | ||
| 1277 | }, | ||
| 1278 | }; | ||
| 1279 | __PACKAGE__->method_documentation->{ 'list_dm_routing_config_rules' } = { | ||
| 1280 | summary => 'List rules', | ||
| 1281 | params => $params, | ||
| 1282 | returns => 'RulesResponse', | ||
| 1283 | }; | ||
| 1284 | } | ||
| 1285 | # @return RulesResponse | ||
| 1286 | # | ||
| 1287 | sub list_dm_routing_config_rules { | ||
| 1288 | my ($self, %args) = @_; | ||
| 1289 | |||
| 1290 | # verify the required parameter 'config_id' is set | ||
| 1291 | unless (exists $args{'config_id'}) { | ||
| 1292 | croak("Missing the required parameter 'config_id' when calling list_dm_routing_config_rules"); | ||
| 1293 | } | ||
| 1294 | |||
| 1295 | # verify the required parameter 'path_id' is set | ||
| 1296 | unless (exists $args{'path_id'}) { | ||
| 1297 | croak("Missing the required parameter 'path_id' when calling list_dm_routing_config_rules"); | ||
| 1298 | } | ||
| 1299 | |||
| 1300 | # parse inputs | ||
| 1301 | my $_resource_path = '/domain-management/v1/routing-configs/{config_id}/paths/{path_id}/rules'; | ||
| 1302 | |||
| 1303 | my $_method = 'GET'; | ||
| 1304 | my $query_params = {}; | ||
| 1305 | my $header_params = {}; | ||
| 1306 | my $form_params = {}; | ||
| 1307 | |||
| 1308 | # 'Accept' and 'Content-Type' header | ||
| 1309 | my $_header_accept = $self->{api_client}->select_header_accept('application/json'); | ||
| 1310 | if ($_header_accept) { | ||
| 1311 | $header_params->{'Accept'} = $_header_accept; | ||
| 1312 | } | ||
| 1313 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); | ||
| 1314 | |||
| 1315 | # query params | ||
| 1316 | if ( exists $args{'sort'}) { | ||
| 1317 | $query_params->{'sort'} = $self->{api_client}->to_query_value($args{'sort'}); | ||
| 1318 | } | ||
| 1319 | |||
| 1320 | # query params | ||
| 1321 | if ( exists $args{'cursor'}) { | ||
| 1322 | $query_params->{'cursor'} = $self->{api_client}->to_query_value($args{'cursor'}); | ||
| 1323 | } | ||
| 1324 | |||
| 1325 | # query params | ||
| 1326 | if ( exists $args{'limit'}) { | ||
| 1327 | $query_params->{'limit'} = $self->{api_client}->to_query_value($args{'limit'}); | ||
| 1328 | } | ||
| 1329 | |||
| 1330 | # path params | ||
| 1331 | if ( exists $args{'config_id'}) { | ||
| 1332 | my $_base_variable = "{" . "config_id" . "}"; | ||
| 1333 | my $_base_value = $self->{api_client}->to_path_value($args{'config_id'}); | ||
| 1334 | $_resource_path =~ s/$_base_variable/$_base_value/g; | ||
| 1335 | } | ||
| 1336 | |||
| 1337 | # path params | ||
| 1338 | if ( exists $args{'path_id'}) { | ||
| 1339 | my $_base_variable = "{" . "path_id" . "}"; | ||
| 1340 | my $_base_value = $self->{api_client}->to_path_value($args{'path_id'}); | ||
| 1341 | $_resource_path =~ s/$_base_variable/$_base_value/g; | ||
| 1342 | } | ||
| 1343 | |||
| 1344 | my $_body_data; | ||
| 1345 | # authentication setting, if any | ||
| 1346 | my $auth_settings = [qw(token )]; | ||
| 1347 | |||
| 1348 | # make the API Call | ||
| 1349 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | ||
| 1350 | $query_params, $form_params, | ||
| 1351 | $header_params, $_body_data, $auth_settings); | ||
| 1352 | if (!$response) { | ||
| 1353 | return; | ||
| 1354 | } | ||
| 1355 | my $_response_object = $self->{api_client}->deserialize('RulesResponse', $response); | ||
| 1356 | return $_response_object; | ||
| 1357 | } | ||
| 1358 | |||
| 1359 | # | ||
| 1360 | # list_dm_routing_config_versions | ||
| 1361 | # | ||
| 1362 | # List versions | ||
| 1363 | # | ||
| 1364 | # @param string $config_id (required) | ||
| 1365 | # @param string $sort The order in which to list the results. (optional, default to '-activated_at') | ||
| 1366 | # @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) | ||
| 1367 | # @param int $limit Limit how many results are returned. (optional, default to 20) | ||
| 1368 | { | ||
| 1369 | my $params = { | ||
| 1370 | 'config_id' => { | ||
| 1371 | data_type => 'string', | ||
| 1372 | description => '', | ||
| 1373 | required => '1', | ||
| 1374 | }, | ||
| 1375 | 'sort' => { | ||
| 1376 | data_type => 'string', | ||
| 1377 | description => 'The order in which to list the results.', | ||
| 1378 | required => '0', | ||
| 1379 | }, | ||
| 1380 | 'cursor' => { | ||
| 1381 | data_type => 'string', | ||
| 1382 | description => 'Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty.', | ||
| 1383 | required => '0', | ||
| 1384 | }, | ||
| 1385 | 'limit' => { | ||
| 1386 | data_type => 'int', | ||
| 1387 | description => 'Limit how many results are returned.', | ||
| 1388 | required => '0', | ||
| 1389 | }, | ||
| 1390 | }; | ||
| 1391 | __PACKAGE__->method_documentation->{ 'list_dm_routing_config_versions' } = { | ||
| 1392 | summary => 'List versions', | ||
| 1393 | params => $params, | ||
| 1394 | returns => 'VersionsResponse', | ||
| 1395 | }; | ||
| 1396 | } | ||
| 1397 | # @return VersionsResponse | ||
| 1398 | # | ||
| 1399 | sub list_dm_routing_config_versions { | ||
| 1400 | my ($self, %args) = @_; | ||
| 1401 | |||
| 1402 | # verify the required parameter 'config_id' is set | ||
| 1403 | unless (exists $args{'config_id'}) { | ||
| 1404 | croak("Missing the required parameter 'config_id' when calling list_dm_routing_config_versions"); | ||
| 1405 | } | ||
| 1406 | |||
| 1407 | # parse inputs | ||
| 1408 | my $_resource_path = '/domain-management/v1/routing-configs/{config_id}/versions'; | ||
| 1409 | |||
| 1410 | my $_method = 'GET'; | ||
| 1411 | my $query_params = {}; | ||
| 1412 | my $header_params = {}; | ||
| 1413 | my $form_params = {}; | ||
| 1414 | |||
| 1415 | # 'Accept' and 'Content-Type' header | ||
| 1416 | my $_header_accept = $self->{api_client}->select_header_accept('application/json'); | ||
| 1417 | if ($_header_accept) { | ||
| 1418 | $header_params->{'Accept'} = $_header_accept; | ||
| 1419 | } | ||
| 1420 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); | ||
| 1421 | |||
| 1422 | # query params | ||
| 1423 | if ( exists $args{'sort'}) { | ||
| 1424 | $query_params->{'sort'} = $self->{api_client}->to_query_value($args{'sort'}); | ||
| 1425 | } | ||
| 1426 | |||
| 1427 | # query params | ||
| 1428 | if ( exists $args{'cursor'}) { | ||
| 1429 | $query_params->{'cursor'} = $self->{api_client}->to_query_value($args{'cursor'}); | ||
| 1430 | } | ||
| 1431 | |||
| 1432 | # query params | ||
| 1433 | if ( exists $args{'limit'}) { | ||
| 1434 | $query_params->{'limit'} = $self->{api_client}->to_query_value($args{'limit'}); | ||
| 1435 | } | ||
| 1436 | |||
| 1437 | # path params | ||
| 1438 | if ( exists $args{'config_id'}) { | ||
| 1439 | my $_base_variable = "{" . "config_id" . "}"; | ||
| 1440 | my $_base_value = $self->{api_client}->to_path_value($args{'config_id'}); | ||
| 1441 | $_resource_path =~ s/$_base_variable/$_base_value/g; | ||
| 1442 | } | ||
| 1443 | |||
| 1444 | my $_body_data; | ||
| 1445 | # authentication setting, if any | ||
| 1446 | my $auth_settings = [qw(token )]; | ||
| 1447 | |||
| 1448 | # make the API Call | ||
| 1449 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | ||
| 1450 | $query_params, $form_params, | ||
| 1451 | $header_params, $_body_data, $auth_settings); | ||
| 1452 | if (!$response) { | ||
| 1453 | return; | ||
| 1454 | } | ||
| 1455 | my $_response_object = $self->{api_client}->deserialize('VersionsResponse', $response); | ||
| 1456 | return $_response_object; | ||
| 1457 | } | ||
| 1458 | |||
| 1459 | # | ||
| 1460 | # list_dm_routing_configs | ||
| 1461 | # | ||
| 1462 | # List routing configs | ||
| 1463 | # | ||
| 1464 | # @param ARRAY[string] $state Filter configs by lifecycle state. Accepts a comma-separated list of state values (e.g. `?state=active,active-with-draft`). Returns only configs whose current state matches one of the provided values. Returns 400 if any value is not a recognised state. (optional) | ||
| 1465 | # @param string $sort The order in which to list the results. (optional, default to '-created_at') | ||
| 1466 | # @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) | ||
| 1467 | # @param int $limit Limit how many results are returned. (optional, default to 20) | ||
| 1468 | { | ||
| 1469 | my $params = { | ||
| 1470 | 'state' => { | ||
| 1471 | data_type => 'ARRAY[string]', | ||
| 1472 | description => 'Filter configs by lifecycle state. Accepts a comma-separated list of state values (e.g. `?state=active,active-with-draft`). Returns only configs whose current state matches one of the provided values. Returns 400 if any value is not a recognised state.', | ||
| 1473 | required => '0', | ||
| 1474 | }, | ||
| 1475 | 'sort' => { | ||
| 1476 | data_type => 'string', | ||
| 1477 | description => 'The order in which to list the results.', | ||
| 1478 | required => '0', | ||
| 1479 | }, | ||
| 1480 | 'cursor' => { | ||
| 1481 | data_type => 'string', | ||
| 1482 | description => 'Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty.', | ||
| 1483 | required => '0', | ||
| 1484 | }, | ||
| 1485 | 'limit' => { | ||
| 1486 | data_type => 'int', | ||
| 1487 | description => 'Limit how many results are returned.', | ||
| 1488 | required => '0', | ||
| 1489 | }, | ||
| 1490 | }; | ||
| 1491 | __PACKAGE__->method_documentation->{ 'list_dm_routing_configs' } = { | ||
| 1492 | summary => 'List routing configs', | ||
| 1493 | params => $params, | ||
| 1494 | returns => 'RoutingConfigsResponse', | ||
| 1495 | }; | ||
| 1496 | } | ||
| 1497 | # @return RoutingConfigsResponse | ||
| 1498 | # | ||
| 1499 | sub list_dm_routing_configs { | ||
| 1500 | my ($self, %args) = @_; | ||
| 1501 | |||
| 1502 | # parse inputs | ||
| 1503 | my $_resource_path = '/domain-management/v1/routing-configs'; | ||
| 1504 | |||
| 1505 | my $_method = 'GET'; | ||
| 1506 | my $query_params = {}; | ||
| 1507 | my $header_params = {}; | ||
| 1508 | my $form_params = {}; | ||
| 1509 | |||
| 1510 | # 'Accept' and 'Content-Type' header | ||
| 1511 | my $_header_accept = $self->{api_client}->select_header_accept('application/json'); | ||
| 1512 | if ($_header_accept) { | ||
| 1513 | $header_params->{'Accept'} = $_header_accept; | ||
| 1514 | } | ||
| 1515 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); | ||
| 1516 | |||
| 1517 | # query params | ||
| 1518 | if ( exists $args{'state'}) { | ||
| 1519 | $query_params->{'state'} = $self->{api_client}->to_query_value($args{'state'}); | ||
| 1520 | } | ||
| 1521 | |||
| 1522 | # query params | ||
| 1523 | if ( exists $args{'sort'}) { | ||
| 1524 | $query_params->{'sort'} = $self->{api_client}->to_query_value($args{'sort'}); | ||
| 1525 | } | ||
| 1526 | |||
| 1527 | # query params | ||
| 1528 | if ( exists $args{'cursor'}) { | ||
| 1529 | $query_params->{'cursor'} = $self->{api_client}->to_query_value($args{'cursor'}); | ||
| 1530 | } | ||
| 1531 | |||
| 1532 | # query params | ||
| 1533 | if ( exists $args{'limit'}) { | ||
| 1534 | $query_params->{'limit'} = $self->{api_client}->to_query_value($args{'limit'}); | ||
| 1535 | } | ||
| 1536 | |||
| 1537 | my $_body_data; | ||
| 1538 | # authentication setting, if any | ||
| 1539 | my $auth_settings = [qw(token )]; | ||
| 1540 | |||
| 1541 | # make the API Call | ||
| 1542 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | ||
| 1543 | $query_params, $form_params, | ||
| 1544 | $header_params, $_body_data, $auth_settings); | ||
| 1545 | if (!$response) { | ||
| 1546 | return; | ||
| 1547 | } | ||
| 1548 | my $_response_object = $self->{api_client}->deserialize('RoutingConfigsResponse', $response); | ||
| 1549 | return $_response_object; | ||
| 1550 | } | ||
| 1551 | |||
| 1552 | # | ||
| 1553 | # reactivate_dm_routing_config_version | ||
| 1554 | # | ||
| 1555 | # Reactivate a version | ||
| 1556 | # | ||
| 1557 | # @param string $config_id (required) | ||
| 1558 | # @param string $version_id (required) | ||
| 1559 | { | ||
| 1560 | my $params = { | ||
| 1561 | 'config_id' => { | ||
| 1562 | data_type => 'string', | ||
| 1563 | description => '', | ||
| 1564 | required => '1', | ||
| 1565 | }, | ||
| 1566 | 'version_id' => { | ||
| 1567 | data_type => 'string', | ||
| 1568 | description => '', | ||
| 1569 | required => '1', | ||
| 1570 | }, | ||
| 1571 | }; | ||
| 1572 | __PACKAGE__->method_documentation->{ 'reactivate_dm_routing_config_version' } = { | ||
| 1573 | summary => 'Reactivate a version', | ||
| 1574 | params => $params, | ||
| 1575 | returns => 'RoutingConfigVersionResponse', | ||
| 1576 | }; | ||
| 1577 | } | ||
| 1578 | # @return RoutingConfigVersionResponse | ||
| 1579 | # | ||
| 1580 | sub reactivate_dm_routing_config_version { | ||
| 1581 | my ($self, %args) = @_; | ||
| 1582 | |||
| 1583 | # verify the required parameter 'config_id' is set | ||
| 1584 | unless (exists $args{'config_id'}) { | ||
| 1585 | croak("Missing the required parameter 'config_id' when calling reactivate_dm_routing_config_version"); | ||
| 1586 | } | ||
| 1587 | |||
| 1588 | # verify the required parameter 'version_id' is set | ||
| 1589 | unless (exists $args{'version_id'}) { | ||
| 1590 | croak("Missing the required parameter 'version_id' when calling reactivate_dm_routing_config_version"); | ||
| 1591 | } | ||
| 1592 | |||
| 1593 | # parse inputs | ||
| 1594 | my $_resource_path = '/domain-management/v1/routing-configs/{config_id}/versions/{version_id}/activate'; | ||
| 1595 | |||
| 1596 | my $_method = 'POST'; | ||
| 1597 | my $query_params = {}; | ||
| 1598 | my $header_params = {}; | ||
| 1599 | my $form_params = {}; | ||
| 1600 | |||
| 1601 | # 'Accept' and 'Content-Type' header | ||
| 1602 | my $_header_accept = $self->{api_client}->select_header_accept('application/json'); | ||
| 1603 | if ($_header_accept) { | ||
| 1604 | $header_params->{'Accept'} = $_header_accept; | ||
| 1605 | } | ||
| 1606 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); | ||
| 1607 | |||
| 1608 | # path params | ||
| 1609 | if ( exists $args{'config_id'}) { | ||
| 1610 | my $_base_variable = "{" . "config_id" . "}"; | ||
| 1611 | my $_base_value = $self->{api_client}->to_path_value($args{'config_id'}); | ||
| 1612 | $_resource_path =~ s/$_base_variable/$_base_value/g; | ||
| 1613 | } | ||
| 1614 | |||
| 1615 | # path params | ||
| 1616 | if ( exists $args{'version_id'}) { | ||
| 1617 | my $_base_variable = "{" . "version_id" . "}"; | ||
| 1618 | my $_base_value = $self->{api_client}->to_path_value($args{'version_id'}); | ||
| 1619 | $_resource_path =~ s/$_base_variable/$_base_value/g; | ||
| 1620 | } | ||
| 1621 | |||
| 1622 | my $_body_data; | ||
| 1623 | # authentication setting, if any | ||
| 1624 | my $auth_settings = [qw(token )]; | ||
| 1625 | |||
| 1626 | # make the API Call | ||
| 1627 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | ||
| 1628 | $query_params, $form_params, | ||
| 1629 | $header_params, $_body_data, $auth_settings); | ||
| 1630 | if (!$response) { | ||
| 1631 | return; | ||
| 1632 | } | ||
| 1633 | my $_response_object = $self->{api_client}->deserialize('RoutingConfigVersionResponse', $response); | ||
| 1634 | return $_response_object; | ||
| 1635 | } | ||
| 1636 | |||
| 1637 | # | ||
| 1638 | # update_dm_routing_config_draft | ||
| 1639 | # | ||
| 1640 | # Update the draft | ||
| 1641 | # | ||
| 1642 | # @param string $config_id (required) | ||
| 1643 | # @param DraftUpdate $draft_update (optional) | ||
| 1644 | { | ||
| 1645 | my $params = { | ||
| 1646 | 'config_id' => { | ||
| 1647 | data_type => 'string', | ||
| 1648 | description => '', | ||
| 1649 | required => '1', | ||
| 1650 | }, | ||
| 1651 | 'draft_update' => { | ||
| 1652 | data_type => 'DraftUpdate', | ||
| 1653 | description => '', | ||
| 1654 | required => '0', | ||
| 1655 | }, | ||
| 1656 | }; | ||
| 1657 | __PACKAGE__->method_documentation->{ 'update_dm_routing_config_draft' } = { | ||
| 1658 | summary => 'Update the draft', | ||
| 1659 | params => $params, | ||
| 1660 | returns => 'RoutingConfigVersionResponse', | ||
| 1661 | }; | ||
| 1662 | } | ||
| 1663 | # @return RoutingConfigVersionResponse | ||
| 1664 | # | ||
| 1665 | sub update_dm_routing_config_draft { | ||
| 1666 | my ($self, %args) = @_; | ||
| 1667 | |||
| 1668 | # verify the required parameter 'config_id' is set | ||
| 1669 | unless (exists $args{'config_id'}) { | ||
| 1670 | croak("Missing the required parameter 'config_id' when calling update_dm_routing_config_draft"); | ||
| 1671 | } | ||
| 1672 | |||
| 1673 | # parse inputs | ||
| 1674 | my $_resource_path = '/domain-management/v1/routing-configs/{config_id}/draft'; | ||
| 1675 | |||
| 1676 | my $_method = 'PATCH'; | ||
| 1677 | my $query_params = {}; | ||
| 1678 | my $header_params = {}; | ||
| 1679 | my $form_params = {}; | ||
| 1680 | |||
| 1681 | # 'Accept' and 'Content-Type' header | ||
| 1682 | my $_header_accept = $self->{api_client}->select_header_accept('application/json'); | ||
| 1683 | if ($_header_accept) { | ||
| 1684 | $header_params->{'Accept'} = $_header_accept; | ||
| 1685 | } | ||
| 1686 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); | ||
| 1687 | |||
| 1688 | # path params | ||
| 1689 | if ( exists $args{'config_id'}) { | ||
| 1690 | my $_base_variable = "{" . "config_id" . "}"; | ||
| 1691 | my $_base_value = $self->{api_client}->to_path_value($args{'config_id'}); | ||
| 1692 | $_resource_path =~ s/$_base_variable/$_base_value/g; | ||
| 1693 | } | ||
| 1694 | |||
| 1695 | my $_body_data; | ||
| 1696 | # body params | ||
| 1697 | if ( exists $args{'draft_update'}) { | ||
| 1698 | $_body_data = $args{'draft_update'}; | ||
| 1699 | } | ||
| 1700 | |||
| 1701 | # authentication setting, if any | ||
| 1702 | my $auth_settings = [qw(token )]; | ||
| 1703 | |||
| 1704 | # make the API Call | ||
| 1705 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | ||
| 1706 | $query_params, $form_params, | ||
| 1707 | $header_params, $_body_data, $auth_settings); | ||
| 1708 | if (!$response) { | ||
| 1709 | return; | ||
| 1710 | } | ||
| 1711 | my $_response_object = $self->{api_client}->deserialize('RoutingConfigVersionResponse', $response); | ||
| 1712 | return $_response_object; | ||
| 1713 | } | ||
| 1714 | |||
| 1715 | # | ||
| 1716 | # update_dm_routing_config_path | ||
| 1717 | # | ||
| 1718 | # Update a path | ||
| 1719 | # | ||
| 1720 | # @param string $config_id (required) | ||
| 1721 | # @param string $path_id (required) | ||
| 1722 | # @param PathUpdate $path_update (optional) | ||
| 1723 | { | ||
| 1724 | my $params = { | ||
| 1725 | 'config_id' => { | ||
| 1726 | data_type => 'string', | ||
| 1727 | description => '', | ||
| 1728 | required => '1', | ||
| 1729 | }, | ||
| 1730 | 'path_id' => { | ||
| 1731 | data_type => 'string', | ||
| 1732 | description => '', | ||
| 1733 | required => '1', | ||
| 1734 | }, | ||
| 1735 | 'path_update' => { | ||
| 1736 | data_type => 'PathUpdate', | ||
| 1737 | description => '', | ||
| 1738 | required => '0', | ||
| 1739 | }, | ||
| 1740 | }; | ||
| 1741 | __PACKAGE__->method_documentation->{ 'update_dm_routing_config_path' } = { | ||
| 1742 | summary => 'Update a path', | ||
| 1743 | params => $params, | ||
| 1744 | returns => 'PathResponse', | ||
| 1745 | }; | ||
| 1746 | } | ||
| 1747 | # @return PathResponse | ||
| 1748 | # | ||
| 1749 | sub update_dm_routing_config_path { | ||
| 1750 | my ($self, %args) = @_; | ||
| 1751 | |||
| 1752 | # verify the required parameter 'config_id' is set | ||
| 1753 | unless (exists $args{'config_id'}) { | ||
| 1754 | croak("Missing the required parameter 'config_id' when calling update_dm_routing_config_path"); | ||
| 1755 | } | ||
| 1756 | |||
| 1757 | # verify the required parameter 'path_id' is set | ||
| 1758 | unless (exists $args{'path_id'}) { | ||
| 1759 | croak("Missing the required parameter 'path_id' when calling update_dm_routing_config_path"); | ||
| 1760 | } | ||
| 1761 | |||
| 1762 | # parse inputs | ||
| 1763 | my $_resource_path = '/domain-management/v1/routing-configs/{config_id}/paths/{path_id}'; | ||
| 1764 | |||
| 1765 | my $_method = 'PATCH'; | ||
| 1766 | my $query_params = {}; | ||
| 1767 | my $header_params = {}; | ||
| 1768 | my $form_params = {}; | ||
| 1769 | |||
| 1770 | # 'Accept' and 'Content-Type' header | ||
| 1771 | my $_header_accept = $self->{api_client}->select_header_accept('application/json'); | ||
| 1772 | if ($_header_accept) { | ||
| 1773 | $header_params->{'Accept'} = $_header_accept; | ||
| 1774 | } | ||
| 1775 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); | ||
| 1776 | |||
| 1777 | # path params | ||
| 1778 | if ( exists $args{'config_id'}) { | ||
| 1779 | my $_base_variable = "{" . "config_id" . "}"; | ||
| 1780 | my $_base_value = $self->{api_client}->to_path_value($args{'config_id'}); | ||
| 1781 | $_resource_path =~ s/$_base_variable/$_base_value/g; | ||
| 1782 | } | ||
| 1783 | |||
| 1784 | # path params | ||
| 1785 | if ( exists $args{'path_id'}) { | ||
| 1786 | my $_base_variable = "{" . "path_id" . "}"; | ||
| 1787 | my $_base_value = $self->{api_client}->to_path_value($args{'path_id'}); | ||
| 1788 | $_resource_path =~ s/$_base_variable/$_base_value/g; | ||
| 1789 | } | ||
| 1790 | |||
| 1791 | my $_body_data; | ||
| 1792 | # body params | ||
| 1793 | if ( exists $args{'path_update'}) { | ||
| 1794 | $_body_data = $args{'path_update'}; | ||
| 1795 | } | ||
| 1796 | |||
| 1797 | # authentication setting, if any | ||
| 1798 | my $auth_settings = [qw(token )]; | ||
| 1799 | |||
| 1800 | # make the API Call | ||
| 1801 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | ||
| 1802 | $query_params, $form_params, | ||
| 1803 | $header_params, $_body_data, $auth_settings); | ||
| 1804 | if (!$response) { | ||
| 1805 | return; | ||
| 1806 | } | ||
| 1807 | my $_response_object = $self->{api_client}->deserialize('PathResponse', $response); | ||
| 1808 | return $_response_object; | ||
| 1809 | } | ||
| 1810 | |||
| 1811 | # | ||
| 1812 | # update_dm_routing_config_rule | ||
| 1813 | # | ||
| 1814 | # Update a rule | ||
| 1815 | # | ||
| 1816 | # @param string $config_id (required) | ||
| 1817 | # @param string $path_id (required) | ||
| 1818 | # @param string $rule_id (required) | ||
| 1819 | # @param RuleUpdate $rule_update (optional) | ||
| 1820 | { | ||
| 1821 | my $params = { | ||
| 1822 | 'config_id' => { | ||
| 1823 | data_type => 'string', | ||
| 1824 | description => '', | ||
| 1825 | required => '1', | ||
| 1826 | }, | ||
| 1827 | 'path_id' => { | ||
| 1828 | data_type => 'string', | ||
| 1829 | description => '', | ||
| 1830 | required => '1', | ||
| 1831 | }, | ||
| 1832 | 'rule_id' => { | ||
| 1833 | data_type => 'string', | ||
| 1834 | description => '', | ||
| 1835 | required => '1', | ||
| 1836 | }, | ||
| 1837 | 'rule_update' => { | ||
| 1838 | data_type => 'RuleUpdate', | ||
| 1839 | description => '', | ||
| 1840 | required => '0', | ||
| 1841 | }, | ||
| 1842 | }; | ||
| 1843 | __PACKAGE__->method_documentation->{ 'update_dm_routing_config_rule' } = { | ||
| 1844 | summary => 'Update a rule', | ||
| 1845 | params => $params, | ||
| 1846 | returns => 'RuleResponse', | ||
| 1847 | }; | ||
| 1848 | } | ||
| 1849 | # @return RuleResponse | ||
| 1850 | # | ||
| 1851 | sub update_dm_routing_config_rule { | ||
| 1852 | my ($self, %args) = @_; | ||
| 1853 | |||
| 1854 | # verify the required parameter 'config_id' is set | ||
| 1855 | unless (exists $args{'config_id'}) { | ||
| 1856 | croak("Missing the required parameter 'config_id' when calling update_dm_routing_config_rule"); | ||
| 1857 | } | ||
| 1858 | |||
| 1859 | # verify the required parameter 'path_id' is set | ||
| 1860 | unless (exists $args{'path_id'}) { | ||
| 1861 | croak("Missing the required parameter 'path_id' when calling update_dm_routing_config_rule"); | ||
| 1862 | } | ||
| 1863 | |||
| 1864 | # verify the required parameter 'rule_id' is set | ||
| 1865 | unless (exists $args{'rule_id'}) { | ||
| 1866 | croak("Missing the required parameter 'rule_id' when calling update_dm_routing_config_rule"); | ||
| 1867 | } | ||
| 1868 | |||
| 1869 | # parse inputs | ||
| 1870 | my $_resource_path = '/domain-management/v1/routing-configs/{config_id}/paths/{path_id}/rules/{rule_id}'; | ||
| 1871 | |||
| 1872 | my $_method = 'PATCH'; | ||
| 1873 | my $query_params = {}; | ||
| 1874 | my $header_params = {}; | ||
| 1875 | my $form_params = {}; | ||
| 1876 | |||
| 1877 | # 'Accept' and 'Content-Type' header | ||
| 1878 | my $_header_accept = $self->{api_client}->select_header_accept('application/json'); | ||
| 1879 | if ($_header_accept) { | ||
| 1880 | $header_params->{'Accept'} = $_header_accept; | ||
| 1881 | } | ||
| 1882 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); | ||
| 1883 | |||
| 1884 | # path params | ||
| 1885 | if ( exists $args{'config_id'}) { | ||
| 1886 | my $_base_variable = "{" . "config_id" . "}"; | ||
| 1887 | my $_base_value = $self->{api_client}->to_path_value($args{'config_id'}); | ||
| 1888 | $_resource_path =~ s/$_base_variable/$_base_value/g; | ||
| 1889 | } | ||
| 1890 | |||
| 1891 | # path params | ||
| 1892 | if ( exists $args{'path_id'}) { | ||
| 1893 | my $_base_variable = "{" . "path_id" . "}"; | ||
| 1894 | my $_base_value = $self->{api_client}->to_path_value($args{'path_id'}); | ||
| 1895 | $_resource_path =~ s/$_base_variable/$_base_value/g; | ||
| 1896 | } | ||
| 1897 | |||
| 1898 | # path params | ||
| 1899 | if ( exists $args{'rule_id'}) { | ||
| 1900 | my $_base_variable = "{" . "rule_id" . "}"; | ||
| 1901 | my $_base_value = $self->{api_client}->to_path_value($args{'rule_id'}); | ||
| 1902 | $_resource_path =~ s/$_base_variable/$_base_value/g; | ||
| 1903 | } | ||
| 1904 | |||
| 1905 | my $_body_data; | ||
| 1906 | # body params | ||
| 1907 | if ( exists $args{'rule_update'}) { | ||
| 1908 | $_body_data = $args{'rule_update'}; | ||
| 1909 | } | ||
| 1910 | |||
| 1911 | # authentication setting, if any | ||
| 1912 | my $auth_settings = [qw(token )]; | ||
| 1913 | |||
| 1914 | # make the API Call | ||
| 1915 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | ||
| 1916 | $query_params, $form_params, | ||
| 1917 | $header_params, $_body_data, $auth_settings); | ||
| 1918 | if (!$response) { | ||
| 1919 | return; | ||
| 1920 | } | ||
| 1921 | my $_response_object = $self->{api_client}->deserialize('RuleResponse', $response); | ||
| 1922 | return $_response_object; | ||
| 1923 | } | ||
| 1924 | |||
| 1925 | 1; |